Like I said, these are RexxPointerObjects. I used this code say 'iter is' iter~class say 'child is' child~class
to produce this output.
iter is The Pointer class
child is The Pointer class
Thanks,
W. David Ashley
IBM Systems and Technology Group Lab Services
Open Object Rexx Team
Mobile Phone: 512-289-7506
"Rick McGuire"
<[EMAIL PROTECTED]
l.com> To
Sent by: "Open Object Rexx Developer Mailing
oorexx-devel-boun List"
[EMAIL PROTECTED] <[email protected]
orge.net >
cc
09/02/2008 01:21 Subject
PM Re: [Oorexx-devel] NewPointer
Method
Please respond to
Open Object Rexx
Developer Mailing
List
<[EMAIL PROTECTED]
ts.sourceforge.ne
t>
There is a HUGE difference between a "RexxObjectPtr" and a
"RexxPointerObject". You cannot just cast a RexxObjectPtr into a
RexxPointerObject unless the instance truly IS an instance of
RexxPointerObject (i.e., created by NewPointer() originally or other
equivalent means (e.g. a POINTER return type from a method). What does
"say iter~class" display before the call to append?
Rick
On Tue, Sep 2, 2008 at 2:16 PM, David Ashley <[EMAIL PROTECTED]> wrote:
> Yes, parent is a RexxPointerObject. I have deliberately made the object
> opaque to the Rexx programmer. It is ALWAYS passed around as a
RexxObjectPtr
> to the C++ method APIs and then converted.
>
> Thanks,
> W. David Ashley
> IBM Systems and Technology Group Lab Services
> Open Object Rexx Team
> Mobile Phone: 512-289-7506
>
>
> "Rick McGuire" ---09/02/2008 01:13:40 PM---Is parent actually a
> RexxPointerObject instance (that would be the
>
> "Rick McGuire" <[EMAIL PROTECTED]>
> Sent by: [EMAIL PROTECTED]
>
> 09/02/2008 01:11 PM
>
> Please respond to
> Open Object Rexx Developer Mailing List
<[email protected]>
>
> To
> "Open Object Rexx Developer Mailing List"
> <[email protected]>
> cc
>
> Subject
> Re: [Oorexx-devel] NewPointer Method
> Is parent actually a RexxPointerObject instance (that would be the
> iter variable passed as an argument). I'm guessing it isn't, and you
> should instead be using context->ObjectToCSelf() and not
> PointerValue() to get the value out. The string form is never used
> for extracting the pointer value, so how the string form renders
> should have no bearing on whether you get a null value back.
>
> Rick
>
> On Tue, Sep 2, 2008 at 1:52 PM, David Ashley <[EMAIL PROTECTED]> wrote:
>> Here is a portion of the relevant Rexx code
>>
>> child = store~append(iter)
>> say child
>>
>> Here is the relevant C++ code
>>
>> RexxMethod2(RexxObjectPtr, // Return type
>> GrxTreeStoreAppend, // Object_method name
>> CSELF, self, // GTK self
>> RexxObjectPtr, parent) // Parent object
>> {
>> GtkTreeIter *piter = NULL;
>> GtkTreeIter iter;
>>
>> if (parent != context->Nil()) {
>> piter = (GtkTreeIter *)context->PointerValue((RexxPointerObject)parent);
>> }
>> gtk_tree_store_append(GTK_TREE_STORE(self), &iter, piter);
>>
>> return (RexxObjectPtr)context->NewPointer(gtk_tree_iter_copy(&iter));
>> }
>>
>> This produces the error every time.
>>
>> Thanks,
>> W. David Ashley
>> IBM Systems and Technology Group Lab Services
>> Open Object Rexx Team
>> Mobile Phone: 512-289-7506
>>
>>
>> "Rick McGuire" ---09/02/2008 12:26:37 PM---Well, give me a example that
>> demonstrates this. Are you sure you
>>
>> "Rick McGuire" <[EMAIL PROTECTED]>
>> Sent by: [EMAIL PROTECTED]
>>
>> 09/02/2008 12:24 PM
>>
>> Please respond to
>> Open Object Rexx Developer Mailing List
>> <[email protected]>
>>
>> To
>> "Open Object Rexx Developer Mailing List"
>> <[email protected]>
>> cc
>>
>> Subject
>> Re: [Oorexx-devel] NewPointer Method
>> Well, give me a example that demonstrates this. Are you sure you
>> haven't accidentally mixed up a usage of a point object with a string
>> object some where?
>>
>> Rick
>>
>> On Tue, Sep 2, 2008 at 1:12 PM, David Ashley <[EMAIL PROTECTED]> wrote:
>>> Rick -
>>>
>>> Sometimes, but not all, the NewPointer method returns a
RexxPointerObject
>>> like this
>>>
>>> 0x0x966d7e0
>>>
>>> You can see this when you display the string value of the pointer. As
you
>>> can see it has an extra 0x at the beginning. This obviously causes
>>> problem
>>> when you try to use this pointer :-) as it will be interpreted a a NULL
>>> pointer later.
>>>
>>> Would you please look into this?
>>>
>>> Thanks,
>>> W. David Ashley
>>> IBM Systems and Technology Group Lab Services
>>> Open Object Rexx Team
>>> Mobile Phone: 512-289-7506
>>>
>>>
-------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>> challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>> world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Oorexx-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>>
>>>
>>
>>
-------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Oorexx-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>
>>
>>
-------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Oorexx-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>>
>>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Oorexx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
<<inline: graycol.gif>>
<<inline: pic11602.gif>>
<<inline: ecblank.gif>>
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
