opensubscriber
   Find in this group all groups
 
Unknown more information…

d : dev@midgard-project.org 8 March 2006 • 7:58PM -0500

Re: [midgard-dev] midgard_guid_new and legacy objects
by Jukka Zitting

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi,

On 3/8/06, Piotras <pp@info...> wrote:
> $person = mgd_get_person(); /* MidgardPerson */
> /* some code */
> $person->create();

mgd_get_person() should generate the GUID.

> MgdObject *object = midgard_object_new_by_id(
>         mgd,  "midgard_person",  (gchar *) mgd->current_user->id);

midgard_object_new_by_id() should get the GUID.

> const gchar *guid;
> g_object_get(G_OBJECT(object), "guid", &guid, NULL);
>
> /* It deson't make sense to check. Throw error!  */
> if(midgard_is_guid(guid))
>         g_error("Person object has no guid value");

That check should never fail on Midgard objects.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - info@yuka...
Software craftsmanship, JCR consulting, and Java development

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.