Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Welcome, Guest. Please login or register.
July 28, 2017, 09:52:10 AM
Home Help Search Login Register
News: Please DM @puremvc on Twitter to gain forum access. Spambots are why we can't have nice things.
Pages: [1]
Print
Author Topic: Documentation up to date?  (Read 8563 times)
JJfutbol
Sr. Member
****
Posts: 53


View Profile WWW
« on: January 23, 2009, 06:50:34 PM »

Installed the editor today and already am coding in Objective C a language I don't know! Man I love PureMVC. Smiley Going through the documentation and noticed a Mediator is defined with a setViewComponent method but when looking at the actual source for EmployeeAdmin it uses a withViewComponent method. No biggie but wondering what is correct? Will the documentation be corrected to reflect that? Or is the library that is part of the EmployeeAdmin demo old?
Logged
JJfutbol
Sr. Member
****
Posts: 53


View Profile WWW
« Reply #1 on: January 23, 2009, 06:54:14 PM »

Another example would be the Proxy has a withData method rather than setData.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2870



View Profile WWW
« Reply #2 on: January 24, 2009, 03:45:03 PM »

Good catch on the method names. Hopefully if there's no real reason for them to be different it will be changed. The framework should remain true to the reference wherever possible to reduce confusion and minimize the need to document differences.

-=Cliff>
Logged
JJfutbol
Sr. Member
****
Posts: 53


View Profile WWW
« Reply #3 on: January 24, 2009, 07:19:15 PM »

No biggie. It's just that it would be best to have consistency but I'm just not sure what is right. Whether its the PureMVC library file or the docs. In the case of the library it does match what seems to be the standards of the Objective C language which is nice. Methods there do tend to start with the word "with". It seems a way to initialize the component.
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2870



View Profile WWW
« Reply #4 on: January 25, 2009, 07:04:54 AM »

That's the essential balance to be struck with these ports; staying true as possible to the reference implementation while not looking like an alien framework from Planet Flash.

If prepending 'with' is magic in Obj C, causing accessors to be made for whatever its prepended to, so be it.

On this one, though I still think if its a matter of choice it should stay like the reference. Its not like it will be incomprehensable.

-=Cliff>
Logged
btknorr
Moderator
Newbie
*****
Posts: 3


View Profile Email
« Reply #5 on: January 25, 2009, 12:28:16 PM »

Hey there,

Just to clarify any confusion...the withViewComponent method is a static convenience method for creating a Mediator - this is standard ObjectiveC convention.  Also all the instance setter and getter methods follow the standard ObjectiveC conventions as well, for example:

myMediator.viewComponent = someViewComponet;
//or
[myMediator setViewComponent:someViewComponent];

someViewComponent = myMediator.viewComponent;
//or
someViewComponent = [myMediator viewComponent];

Hope this helps:)

Best,

Brian
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2870



View Profile WWW
« Reply #6 on: January 27, 2009, 06:08:47 AM »

Ok, I thought that might be a bit of a magic incantation.

-=Cliff>
Logged
Pages: [1]
Print
Jump to: