builder

How to tell Builder to not to escape values

ruby-1.8.7-p249 > xml = Builder::XmlMarkup.new => <inspect/> ruby-1.8.7-p249 > xml.foo '<b>wow</b>' => "<inspect/><foo>&lt;b&gt;wow&lt;/b&gt;</foo>" ruby-1.8.7-p249 > Builder is escaping the content and is converting the b tag into an escaped value. How do I tell Builder to not escape it? I am using Ruby 1.8.7. ...

How to build a builder dynamically with escaped values

Now I know how to build xml without escaping values. http://stackoverflow.com/questions/2693036/how-to-tell-bulider-to-not-to-escape-values However I need to build tags dynamically. Desired result <bank_info>Chase</bank_info> What I have is attr = 'bank_info' builder = Builder::XmlMarkup.new builder.attr { |x| x << 'bank_info' } #...

Flash builder 4 tracing problem in debug mode.

Hey everybody I am trying to use trace() in flash builder 4 - but it doesn't work! I am running in "debug", also I added to the flex compiler options the "-debug=true" option. What am I doing wrong ??? Thanks! ...

How to add a slot to my main window in Qt builder?

I am using Qt Builder to create a simple window. I used the menu editor to add a menu. Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is how to add a slot to the main window. Here is what I have: private slots: void OnAbout(); However, I can't get this method to show ...

Does Qt Builder have a built-in tool for editing a toolbar?

By default, Qt Builder adds a toolbar to a Qt4 GUI Application. How do I edit the toolbar? I right-clicked it but there was nothing useful in the menu. ...

XML testing in Rails - Fixed attributes order in Builder::XmlMarkup in ruby -

I have the following test in my Rails Application: it "should validate xml" do builder = Builder::XmlMarkup.new builder.server(:name => "myServer", :ip => "192.168.1.1").should == "<server name=\"myServer\" ip=\"192.168.1.1\"/>" end The problem is that this test passes sometimes, because the order of the xml tag attributes is unpr...

Reporter Builder 2.0

I am developing a simple report in report builder,and i cant fix rows height bug. When a row has just one line it dont fit the text,and a whiteline appears below it,because others rows in the same grid ,has 2 or more lines. I try to change properties:"can shrink" and "can grow",but it doesnt solve. Any ideas? ...

Is it possible to generate plain-old XML using Haml?

I've been working on a piece of software where I need to generate a custom XML file to send back to a client application. The current solutions on Ruby/Rails world for generating XML files are slow, at best. Using builder or event Nokogiri, while have a nice syntax and are maintainable solutions, they consume too much time and processing...

Xcode / Interface Builder - better workflow from designer to coder?

Were dealing with some pretty custom UI elements while building our OSX / Cocoa and iPhone / IPad apps. I was wondering if anyone has good recommendations or tricks for getting a better workflow between UI designers and coders while using Xcode / Interface Builder? It seems that many things require programmatic settings with UI editing...

Protection of acces with Auto-Implemented Properties in C#

A simple example. A have a class TDMReader which is a buldier of TDMFile objects and I am using Auto Implemented Properties f.e. public string Name { get; set; } public Group[] Groups { get; set; } What I want to do is to make setter accessible only for TDMReader methods. In...

Is there an out of directory project builder for PHP yet?

So that I can keep the .proj from my PHP project. This gives great flexibility for me to switch from one IDE to another(for debug,of course:)). ...

Flex ; get the value of RadioButton inside a FormItem

Hi, I'm working on Flash Builder with latest flex SDK. I have a problem getting the value radioButton of the selceted radio button inside a form: <mx:Form id="form_new_contribution"> <mx:FormItem label="Contribution type" includeIn="project_contributions"> <mx:RadioButtonGroup id="myG" enabled="true" /> <mx:RadioButton id="subtit...

Java Builder pattern with Generic type bounds

Hi all, I'm attempting to create a class with many parameters, using a Builder pattern rather than telescoping constructors. I'm doing this in the way described by Joshua Bloch's Effective Java, having private constructor on the enclosing class, and a public static Builder class. The Builder class ensures the object is in a consistent...

How do I delegate building to a method?

I am writing a Groovlet and would like to delegate part of the HTML builder to a method but am having trouble getting it to work. Below is what I have: def pages = [page1: html.p("page1")] html.html { p("p") pages[page1] } I am expecting the following output: <html> <p>p</p> <p>page1</p> </html> Instead what I get is the fo...

Rails Atom builder xml.tag!("activity:object-type") error

I am creating a activity stream of my feeds according to the http://activitystrea.ms standard. I am using rails atom builder to create a valid atom feed, but when I use xml.tag!("activity:object-type", "http://activitystrea.ms/schema/1.0/person") the atom feed goes blank.On seeing the source I find the correct xml format from what ...

How to access attributes using Nokogiri

I have a simple task of accessing the values of some attributes. Below is a simple script that uses Nokogiri::XML::Builder to create a simple xml doc. require 'nokogiri' builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| xml.Placement(:messageId => "392847-039820-938777", :system => "MOD", :version => "2.0") { x...

C Builder TForm not allocated or created properly all its controls

I would know how i can check that all the controls on the form is created and initialized. I have form i am showing when user presses the 'update' button. It have only TProgressBar control. The handle is not NULL for this control and at random stages it can or can't set the Position/Max values. When i set TProgressBar->Max value to so...

Build xib Interface Builder and load them as subview in iphone

Hi all, what I would like to know if it's possible to build a view and its correspondent xib file. Then, in a generic controller, load this view programmatically and add as a subview to the current view. This subview should act as a generic info box which can be loaded by many controller. thanks Leonardo ...

Kohana 3 - Query builder gives 0 rows

The following query returns one row as expected when run from phpmyadmin. SELECT units . * , locations . * FROM units, locations WHERE units.id = '1' AND units.location_id = locations.id LIMIT 0 , 30 But when I try to do it in Kohana 3: $unit = DB::select('units.*', 'locations.*') ->from('units', 'locations') ->where('units.id', '...

How to insert a WebView into a cocoa app?

I'm rather new with the whole OSX programming, I wanted to stick a WebView into an empty app. Apparently it isn't as simple as sticking a WebView on a window in interface builder and creating an outlet. IBOutlet WebView *webView; It gives me a expected specifier-qualifier-list before 'WebView' and when I don't use an outlet, it te...