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