Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Documentation up to date?  (Read 14920 times)
JJfutbol
Sr. Member
****
Posts: 53


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

Installed the editor today and already am coding in Objective C a language I don't know! Man I love PureMVC. :) 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 Email
« Reply #1 on: January 23, 2009, 06:54:14 »

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



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

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 Email
« Reply #3 on: January 24, 2009, 07:19:15 »

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: 2871



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

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 »

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: 2871



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

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

-=Cliff>
Logged
Pages: [1]
Print