• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Data types in Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Data types in Applescript


  • Subject: Data types in Applescript
  • From: Matteo Rossi <email@hidden>
  • Date: Tue, 23 Apr 2002 22:30:36 +0200

I'm trying to make scriptable my application but I've run into a problem I can't solve.
I can simply handle basic data types such as pointers to classes in relations and scalar types (float, integer...) in attributes. Everything works fine as long as I don't try to access custom data type as the following:

typedef struct _point3D
{
double x;
double y;
double z;
} point3D;

I've written my accessor methods:

-(point3D) point
{
return _point;
}

- (void) setPoint:(point3D) point
{
_point = point;
}

I know I can store structured data type with NSValue through encoding, but if I specify in my suite definition:
...
"Attributes" =
{
"point" =
{
"Type" = "NSValue";
"AppleEventCode" = "xstp";
};
};
...
it doesn't work (neither I know how it could...).
I've tried using "Type" = "NSValue<XCADPoint3D>";... nothing.
I've even tried overriding valueForKey, but it doesn't seem to be called.
Which is the right way to handle custom data type ?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Hiding the menubar and the dock?
  • Next by Date: Re: How to validate the Undo menu item?
  • Previous by thread: Re: Hiding the menubar and the dock?
  • Next by thread: Text in OpenGL
  • Index(es):
    • Date
    • Thread