Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MVC Example #53

Open
overture8 opened this issue Dec 27, 2012 · 1 comment
Open

MVC Example #53

overture8 opened this issue Dec 27, 2012 · 1 comment

Comments

@overture8
Copy link

Are there any good examples of how to use MVC functionality? So far I've found these:-

https://github.com/mattetti/phare/blob/master/lib/application.rb

and

https://github.com/isaac/MacRuby/blob/fac1edf7d399d657c6d74a4167adac514ee6b697/sample-macruby/HotCocoa/mvc/lib/application.rb

I can't seem to get them working though. Are there any more recent examples?

@overture8
Copy link
Author

Part of the issue might be due to this line:

https://github.com/HotCocoa/hotcocoa/blob/master/lib/hotcocoa/mvc.rb#L43

 Object.const_get(controller_name_string !~ /_/ && controller_name_string =~ /[A-Z]+.*/)

The argument supplied here will return a boolean value whereas it requires a string. Compare this to the @richkilmer original. Notice the Object.const_get call spans two lines here:-

https://github.com/richkilmer/hotcocoa/blob/master/lib/hotcocoa/mvc.rb#L32-L33

Think this might be a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant