Intuition

Different tags for the same data?

Hi,

Going through some documentation, I stumbled upon these 2 tags:

WA_UserPort - (struct MsgPort *) A message port used as shared
idcmp port for this window. Intuition will never attempt to
delete this port. CloseWindow() will strip all messages
(belonging to the window) from the port before closing the
given window. (V50)

and:

WINDOW_SharedPort (struct MsgPort *)
Pointer to a custom UserPort this window should share.

Forums: 

How to get position of cursor in string gadget

I'm trying to read the current position of the cursor in a string gadget. This is what I tried which doesn't seem to work.

ULONG cursor_pos;

return_val =(Iintuition->GetAttrs(Object *)gadgets[GID_TITLE_TEXT], STRINGA_DispPos, &cursor_pos, TAG_DONE);
printf("Cursor Position = %ld \n", cursor_pos);

Cursor position is alway 0. I'm out of ideas. Any help!
====================================================

OK, got t. I neededto use the STRINGA_BufferPos tag as STRINGA_DispPos appears to only be valid when the gadget is active.

Forums: 

Drag and Drop on List Browser?

Is it possible to have drag & drop associated with a list browser? Or is it only associated with a Window or a specified area of the Window?

Also, is there any example code demonstrating Drag & Drop anywhere?

I would like to implement dragging and dropping of video files into a list browser.
Thanks in advance to anyone who can help.

Forums: 

Workbench problem

Hi, guys. I've been working on a game. I'm on the verge of uploading a demo. However, I've run into a problem. The program runs okay in a shell. But when I run it in Workbench, it freezes up. I've identified where the problem occurs. I have two functions called OnLButtonDown and OnLButtonUp. They handle left button clicks. When either function is called, the first thing it does is lock up the computer. As far as I can tell it doesn't execute any instructions, it just goes off into Never-Never Land. It does this on my X5000. It works okay on my Micro.

Forums: 

Setting of tag WINDOW_FrontBack fails

Hi,

I'm using this hook function in order to cope with a.o. changes in a window's position, beit in vertical or horizontal direction or in depth. The latter one gives me problems.

The situation is as follows:
From a main window (= mother, indexed by WOID_MAIN) I open a second window (= daughter, indexed by WOID_TASK). Daugther should ALWAYS be in the middle of mother and always be in front of mother and always be the active one. However, whatever I do there is an unacceptable great chance that daughter gets BEHIND mother and is therefore no longer reachable.

Forums: 

Reaction - Change the content of string.gadget dynamically ?

Hi

Let's say we have a gadget like following:

if((gb_StringGad = (struct Gadget *) IIntuition->NewObject(IString->STRING_GetClass(),NULL,
GA_ID, GAD_ID_String,
GA_RelVerify, TRUE,
GA_TabCycle, TRUE,
STRINGA_MaxChars, 6,
STRINGA_MinVisible, 6,
STRINGA_TextVal, pcbtempstring,
TAG_DONE)))

How can I change some attributes (e.g. text value)

Forums: 

Pages

Subscribe to RSS - Intuition