[MacRuby-devel] Other private frameworks

2011-11-13 Thread Rob Ista
Hi, does anyone have experience embedding other frameworks or dylibs in an 
employed app? The "build for archive" runs fine but "archive" itself crashes 
complaint that "the application bundle was not found" but i assume that the 
other frameworks were not found or embedded. The app runs fine without the 
deploy and deploying the app without the other frameworks (just by removing 
them from the "linked framework list") is ok too. The only solution i have now 
is to create and archive a "fake app" --> " "build for archive" with the real 
one --> do a lot post-processing work in the app like including frameworks and 
dylibs manually --> manual code signing of all .rbo's and other executables --> 
overwrite the fake app with the real one --> validate --> upload --> pf …. 

I think macruby_deploy needs an update :)

cheers, Rob
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] anyone using WebKit to generate dialogs?

2011-11-13 Thread Rich Morin
Google SketchUp's WebDialog class allows Ruby plugins to
generate, launch, and support interactive dialogs, using
HTML and JavaScript.  Basically, the plugin:

*  sets up some callback code
*  generates some HTML (etc) code
*  points SketchUp at the HTML

SketchUp then puts up a window whose layout is specified
by the HTML (etc) code.  User actions may be handled by
JavaScript and/or callbacks to the Ruby plugin.

Although there are some awkward aspects to this approach,
I like the ability to generate dynamic content, use CSS
and jQuery, etc.


It looks like WebKit could provide similar capabilities,
using MacRuby as the "back end".  I'm curious whether
anyone has been playing with this approach, possibly using
HotCocoa magic to tidy things up.

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Software system design, development, and documentation
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Create new Core Data Instances

2011-11-13 Thread Timo Springmann
Hi List,

I've successfully created a core data entity with some attributes. I'm 
displaying object in a NSTableView and I was able to add new instances by 
calling the entities array controller add: action.

The last hour I tried to figure out how to add/create a core data entity in 
ruby code without using the interface builder. I tried to instantiate a new 
object like this:

MyEntity.new

but I always get  the following error:

Failed to call designated initializer on NSManagedObject class 'MyEntity'

What's the proper way of doing this?

For rails-devs: I'm looking for something like:
a = MyARObject.new
a.attribute1 = "test"
a.attribute2 = "test2
a.save

Regards,
Timo

-- 
twitter.com/orangeorb

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Create new Core Data Instances

2011-11-13 Thread Timo Springmann
A small step ahead...

... the following code seems to create an instance of MyEntity and sets the 
attribute 'attribute1' to the value 'Test'.

entityDesc = NSEntityDescription.new
entityDesc.setName("MyEntity")

att = NSAttributeDescription.new
att.setAttributeType(NSStringAttributeType)
att.setName("attribute1")
entityDesc.setProperties([att])

instance = MyEntity.alloc.initWithEntity(entityDesc, 
insertIntoManagedObjectContext:nil)
instance.setValue("Test", forKey:"attribute1")
 
Two question arising from this code:

a) Is it really THAT complicated to create an instance of MyEntity and set the 
attribute? I'm coming from the Rails/ActiveRecord world where this could easily 
be done with a single line of code (including saving the instantiated object): 
MyEntity.new(:attribute1 => "Test").save )

b) How can I save this fresh instance and update my NSTableView?

Regards,
Timo


Am 13.11.2011 um 22:20 schrieb Timo Springmann:

> Hi List,
> 
> I've successfully created a core data entity with some attributes. I'm 
> displaying object in a NSTableView and I was able to add new instances by 
> calling the entities array controller add: action.
> 
> The last hour I tried to figure out how to add/create a core data entity in 
> ruby code without using the interface builder. I tried to instantiate a new 
> object like this:
> 
> MyEntity.new
> 
> but I always get  the following error:
> 
> Failed to call designated initializer on NSManagedObject class 'MyEntity'
> 
> What's the proper way of doing this?
> 
> For rails-devs: I'm looking for something like:
> a = MyARObject.new
> a.attribute1 = "test"
> a.attribute2 = "test2
> a.save
> 
> Regards,
> Timo
> 
> -- 
> twitter.com/orangeorb
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-- 
Ich im Web 2.0 - www.orangeorb.de - twitter.com/orangeorb

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Some general MacRuby/Cocoa questions

2011-11-13 Thread Henry Maddocks

On 12/11/2011, at 9:21 PM, Timo Springmann wrote:

> 
> I think one controller per window is fine. What I don't like about the code 
> is the windowNibName method. Do I really have to do it this way? Or is there 
> a better way to 'connect' my in IB designed window to my ruby contoller class?

I'm a bit rusty on thew stuff but I'm pretty sure that this method is optional 
as long as the NIB name can be inferred from the controller name, or you can 
connect it up in IB.

Failing that just add a method to the base class that dynamically creates this 
method. It's Ruby after all, why not use it's flexibility?

Henry


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] anyone using WebKit to generate dialogs?

2011-11-13 Thread Michael Pitra

I have a similar approach in one of my applications: a WebKit view embedded in 
a custom window. All code is MacRuby except the custom window, I only managed 
to do this in pure Cocoa. The content of the WebKit view is then rendered by 
appending HTML content to a string.

Michael


- Ursprüngliche Mail -
Von: "Rich Morin" 
An: [email protected]
Gesendet: Sonntag, 13. November 2011 18:07:37
Betreff: [MacRuby-devel] anyone using WebKit to generate dialogs?

Google SketchUp's WebDialog class allows Ruby plugins to
generate, launch, and support interactive dialogs, using
HTML and JavaScript.  Basically, the plugin:

*  sets up some callback code
*  generates some HTML (etc) code
*  points SketchUp at the HTML

SketchUp then puts up a window whose layout is specified
by the HTML (etc) code.  User actions may be handled by
JavaScript and/or callbacks to the Ruby plugin.

Although there are some awkward aspects to this approach,
I like the ability to generate dynamic content, use CSS
and jQuery, etc.


It looks like WebKit could provide similar capabilities,
using MacRuby as the "back end".  I'm curious whether
anyone has been playing with this approach, possibly using
HotCocoa magic to tidy things up.

-r
-- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume [email protected]
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Software system design, development, and documentation
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel