Welcome, Guest. Please login or register.

Author Topic: Getting datatype handle from DTA_Sync message on IDCMP_IDCMPUPDATE  (Read 2585 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
While processing IDCMPUPDATE messages I'm checking the taglist on IAdress. Then process the DTA_Sync tag to be able to update a datatype after loading it to a window (RefreshDtObjectA()), so that the window display is updated automatically.

However let's suppose I load various user defined (through requesters) datatypes to a window. How do I know to which datatype a given DTA_Sync corresponds to ? I tried to look for DTA_Handle tag in the taglist on IAdress but it's not included ...

\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Getting datatype handle from DTA_Sync message on IDCMP_IDCMPUPDATE
« Reply #1 on: April 09, 2009, 05:00:42 PM »
@Thomas
Hey, thanks a bunch. But I'm finding that method not very practical. GA_ID only uses 2 bytes of size meaning I can't put my datatype handle in there directly. So I'd have to wonder through the window's gadget list till I find a particular ID... Even then I'd still have to get the datatype handle from the gadget structure...
I thought about using GA_UserData but it doesn't show up in the IDCMPUPDATE message....

Of course, I could dynamically build my own list of datatypes with their IDs, I just thought there was a more practical way to do it...

Cheers
José
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Getting datatype handle from DTA_Sync message on IDCMP_IDCMPUPDATE
« Reply #2 on: April 09, 2009, 05:45:25 PM »
"The gadget structure *is* the datatype handle."

Aha! Good. I said that cause the datatypes handle is declared as an APTR in the docs so I thought it was supposed to be considered a black box (i.e. don't toutch and all of that...).
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Getting datatype handle from DTA_Sync message on IDCMP_IDCMPUPDATE
« Reply #3 on: April 10, 2009, 02:40:09 PM »
Something I want to share. Been fiddling with the the tags received in IDCMPUPDATE messages and found that for datatypes the address is in DTA_Data!!!!!
Yeah baby!!
There had to be an easier way... :-D

Cheers
\\"We made Amiga, they {bleep}ed it up\\"