Adding NSArray and NSDictionary as options to LCObjectPost

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Adding NSArray and NSDictionary as options to LCObjectPost

Post by monte » Wed May 21, 2014 1:33 am

Hi

I'm in the process of implementing geocoding in mergCL and want to send callbacks with place mark dictionaries but LCArgumentsCreateV doesn't yet support NSArray and NSDictionary. I'm adding in the following so hope you find the chars suitable... A makes sense for Array and because D is used I went for Y for dictionary:

Code: Select all

case 'A': // NSArray*
			{
				NSArray *t_data;
				t_data = va_arg(p_args, NSArray *);
		 t_error = (MCError)LCValueArrayFromObjcArray(t_argv[i], t_data);
			}
            break;
                
            case 'Y': // NSDictionary*
			{
				NSDictionary *t_data;
				t_data = va_arg(p_args, NSDictionary *);
		 t_error = (MCError)LCValueArrayFromObjcDictionary(t_argv[i], t_data);
			}
            break;
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Adding NSArray and NSDictionary as options to LCObjectPo

Post by monte » Wed May 21, 2014 5:18 am

The above is crashing on the first lookup key at the moment... trying to work it out..
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

Locked

Return to “Engine Contributors”