repo
string | commit
string | message
string | diff
string |
---|---|---|---|
theflow/deployed_at
|
70777c7c6e483b5070d46a76c9133fd1b7c9001e
|
fix archive view for multiple years
|
diff --git a/deployed_at.rb b/deployed_at.rb
index ec8ba4c..893a8a2 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,255 +1,255 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
require 'net/smtp'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
after :save, :notify
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
def notify
DeployMailer.send(project, current_rev, head_rev, scm_log)
end
def month
created_at.strftime('%Y-%m')
end
def self.in_month(year_month)
year, month = year_month.split('-')
next_month = "#{year}-%02i" % (month.to_i + 1)
all(:created_at.gte => year_month, :created_at.lt => next_month, :order => [:created_at.desc])
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
def all_deploys_grouped_by_date
deploys.all(:order => [:created_at.desc]).inject({}) do |groups, deploy|
(groups[deploy.month] ||= []) << deploy
groups
end
end
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
def manage_subscriptions(param_hash)
subscriptions.clear
subscriptions.save
param_hash.keys.each do |project_id|
subscriptions.create(:project_id => project_id)
end
end
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
class DeployMailer
class << self
attr_accessor :config
end
def self.send(project, current_rev, head_rev, svn_log)
recipients = project.users.map { |u| u.email }
return if recipients.empty?
message_body = format_msg(project.name, current_rev, head_rev, svn_log)
send_by_smtp(message_body, 'DeployedAt <[email protected]>', recipients)
end
def self.send_by_smtp(body, from, to)
Net::SMTP.start(config[:host], config[:port], 'localhost', config[:user], config[:pass], config[:auth]) do |smtp|
smtp.send_message(body, from, to)
end
end
def self.format_msg(project_name, current_rev, head_rev, svn_log)
msg = <<END_OF_MESSAGE
From: DeployedIt <[email protected]>
To: DeployedIt <[email protected]>
Subject: [DeployedIt] #{project_name} deploy
* Deployment started at #{Time.now}
* Changes in this deployment:
#{svn_log}
END_OF_MESSAGE
end
end
CONFIG_FILE = File.join(File.dirname(__FILE__), 'config.yml')
if File.exist?(CONFIG_FILE)
DeployMailer.config = YAML::load_file(CONFIG_FILE)['smtp_settings']
else
puts ' Please create a config file by copying the example config:'
puts ' $ cp config.example.yml config.yml'
exit
end
DataMapper.auto_upgrade!
get '/' do
@deploys = Deploy.all(:order => [:created_at.desc], :limit => 15)
@title = 'Recent deploys'
erb :dashboard
end
get '/projects/:id' do
@project = Project.get(params[:id])
if params[:show]
@last_deploys = @project.deploys.in_month(params[:show])
else
@last_deploys = @project.deploys.all(:order => [:created_at.desc], :limit => 10)
end
@grouped_deploys = @project.all_deploys_grouped_by_date
- @years = @grouped_deploys.keys.map { |month| month.split('-').first }.uniq
+ @years = @grouped_deploys.keys.map { |month| month.split('-').first }.uniq.sort.reverse
@title = "Recent deploys for #{@project.name}"
erb :deploys_list
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :deploys_show
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
redirect '/session' and return if logged_out?
@subscribed_projects = current_user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
redirect '/session' and return if logged_out?
current_user.manage_subscriptions(params)
redirect 'subscriptions'
end
before do
@projects = Project.all if request.get?
end
helpers do
def logged_out?
session[:user_id].blank?
end
def current_user
@user ||= User.get(session[:user_id])
end
def format_time(time)
time.strftime('%b %d %H:%M')
end
def link_to_month(month_name, month, project, grouped_deploys)
number_of_deploys = grouped_deploys.has_key?(month) ? grouped_deploys[month].size : 0
if number_of_deploys == 0
- month_name
+ "<span class=\"quiet\">#{month_name}</span>"
else
"<a href=\"/projects/#{project.id}?show=#{month}\">#{month_name}</a> <small>(#{number_of_deploys})</small>"
end
end
end
diff --git a/public/deployed_at.css b/public/deployed_at.css
index 7d39e06..27dc9b7 100644
--- a/public/deployed_at.css
+++ b/public/deployed_at.css
@@ -1,42 +1,41 @@
body {
margin:1.5em 0;
}
#main_nav {
float: right;
font-weight: bold;
}
#project_nav {
margin: 0 0 10px 1px;
}
#project_nav a {
text-decoration: none;
background-color: #381392;
border: 1px solid #381392;
color: white;
padding: 2px 5px;
margin-right: 5px;
}
#project_nav a:hover,
#project_nav a.active {
color: #001092;
background-color: white;
}
pre {
font-family: Monaco, "Lucida Console", monospace;
font-size: 12px;
}
ul.archive {
- float: left;
list-style-type: none;
- margin: 0 40px 0 0;
+ margin: 0;
}
ul.archive li a {
font-weight: bold;
}
diff --git a/views/deploys_list.erb b/views/deploys_list.erb
index be4dd48..ca6b247 100644
--- a/views/deploys_list.erb
+++ b/views/deploys_list.erb
@@ -1,37 +1,41 @@
-<div class="span-22">
- <% for year in @years %>
- <div class="span-6 append-bottom">
+<div class="span-24 last">
+ <% @years.each_with_index do |year, i| %>
+ <div class="span-6 append-bottom <%= 'last' if @years.size == i + 1 %>">
<h2><%= year %></h2>
- <ul class="archive">
- <li><%= link_to_month('December', "#{year}-12", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('November', "#{year}-11", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('October', "#{year}-10", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('September', "#{year}-09", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('August', "#{year}-08", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('July', "#{year}-07", @project, @grouped_deploys) %></li>
- </ul>
+ <div class="span-3">
+ <ul class="archive">
+ <li><%= link_to_month('December', "#{year}-12", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('November', "#{year}-11", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('October', "#{year}-10", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('September', "#{year}-09", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('August', "#{year}-08", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('July', "#{year}-07", @project, @grouped_deploys) %></li>
+ </ul>
+ </div>
- <ul class="archive">
- <li><%= link_to_month('June', "#{year}-06", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('May', "#{year}-05", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('April', "#{year}-04", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('March', "#{year}-03", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('February', "#{year}-02", @project, @grouped_deploys) %></li>
- <li><%= link_to_month('January', "#{year}-01", @project, @grouped_deploys) %></li>
- </ul>
+ <div class="span-3 last">
+ <ul class="archive">
+ <li><%= link_to_month('June', "#{year}-06", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('May', "#{year}-05", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('April', "#{year}-04", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('March', "#{year}-03", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('February', "#{year}-02", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('January', "#{year}-01", @project, @grouped_deploys) %></li>
+ </ul>
+ </div>
</div>
<% end %>
</div>
<hr />
<table>
<% @last_deploys.each_with_index do |deploy, i| %>
<tr class="large <%= i % 2 == 0 ? 'even' : '' %>">
<td><a href="/deploys/<%= deploy.id %>"><%= deploy.title %></a> <span class="small">(<%= deploy.changes %> changes)</span></td>
<td>by <%= deploy.user %></td>
<td class="quiet"><%= format_time(deploy.created_at) %></td>
<td><%= deploy.project.name %></td>
</tr>
<% end %>
</table>
|
theflow/deployed_at
|
8738c149f0f2ac7825fa2d9b05883b2b58198acd
|
added an archive view for projects.
|
diff --git a/deployed_at.rb b/deployed_at.rb
index 764c5d0..ec8ba4c 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,222 +1,255 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
require 'net/smtp'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
after :save, :notify
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
def notify
DeployMailer.send(project, current_rev, head_rev, scm_log)
end
+
+ def month
+ created_at.strftime('%Y-%m')
+ end
+
+ def self.in_month(year_month)
+ year, month = year_month.split('-')
+ next_month = "#{year}-%02i" % (month.to_i + 1)
+ all(:created_at.gte => year_month, :created_at.lt => next_month, :order => [:created_at.desc])
+ end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
+ def all_deploys_grouped_by_date
+ deploys.all(:order => [:created_at.desc]).inject({}) do |groups, deploy|
+ (groups[deploy.month] ||= []) << deploy
+ groups
+ end
+ end
+
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
def manage_subscriptions(param_hash)
subscriptions.clear
subscriptions.save
param_hash.keys.each do |project_id|
subscriptions.create(:project_id => project_id)
end
end
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
class DeployMailer
class << self
attr_accessor :config
end
def self.send(project, current_rev, head_rev, svn_log)
recipients = project.users.map { |u| u.email }
return if recipients.empty?
message_body = format_msg(project.name, current_rev, head_rev, svn_log)
send_by_smtp(message_body, 'DeployedAt <[email protected]>', recipients)
end
def self.send_by_smtp(body, from, to)
Net::SMTP.start(config[:host], config[:port], 'localhost', config[:user], config[:pass], config[:auth]) do |smtp|
smtp.send_message(body, from, to)
end
end
def self.format_msg(project_name, current_rev, head_rev, svn_log)
msg = <<END_OF_MESSAGE
From: DeployedIt <[email protected]>
To: DeployedIt <[email protected]>
Subject: [DeployedIt] #{project_name} deploy
* Deployment started at #{Time.now}
* Changes in this deployment:
#{svn_log}
END_OF_MESSAGE
end
end
CONFIG_FILE = File.join(File.dirname(__FILE__), 'config.yml')
if File.exist?(CONFIG_FILE)
DeployMailer.config = YAML::load_file(CONFIG_FILE)['smtp_settings']
else
puts ' Please create a config file by copying the example config:'
puts ' $ cp config.example.yml config.yml'
exit
end
DataMapper.auto_upgrade!
get '/' do
@deploys = Deploy.all(:order => [:created_at.desc], :limit => 15)
@title = 'Recent deploys'
erb :dashboard
end
get '/projects/:id' do
@project = Project.get(params[:id])
- @deploys = @project.deploys.all(:order => [:created_at.desc])
+ if params[:show]
+ @last_deploys = @project.deploys.in_month(params[:show])
+ else
+ @last_deploys = @project.deploys.all(:order => [:created_at.desc], :limit => 10)
+ end
+
+ @grouped_deploys = @project.all_deploys_grouped_by_date
+ @years = @grouped_deploys.keys.map { |month| month.split('-').first }.uniq
@title = "Recent deploys for #{@project.name}"
erb :deploys_list
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :deploys_show
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
redirect '/session' and return if logged_out?
@subscribed_projects = current_user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
redirect '/session' and return if logged_out?
current_user.manage_subscriptions(params)
redirect 'subscriptions'
end
before do
@projects = Project.all if request.get?
end
helpers do
def logged_out?
session[:user_id].blank?
end
def current_user
@user ||= User.get(session[:user_id])
end
def format_time(time)
time.strftime('%b %d %H:%M')
end
+
+ def link_to_month(month_name, month, project, grouped_deploys)
+ number_of_deploys = grouped_deploys.has_key?(month) ? grouped_deploys[month].size : 0
+ if number_of_deploys == 0
+ month_name
+ else
+ "<a href=\"/projects/#{project.id}?show=#{month}\">#{month_name}</a> <small>(#{number_of_deploys})</small>"
+ end
+ end
end
diff --git a/public/deployed_at.css b/public/deployed_at.css
index 1eb5868..7d39e06 100644
--- a/public/deployed_at.css
+++ b/public/deployed_at.css
@@ -1,32 +1,42 @@
body {
margin:1.5em 0;
}
#main_nav {
float: right;
font-weight: bold;
}
#project_nav {
margin: 0 0 10px 1px;
}
#project_nav a {
text-decoration: none;
background-color: #381392;
border: 1px solid #381392;
color: white;
padding: 2px 5px;
margin-right: 5px;
}
#project_nav a:hover,
#project_nav a.active {
color: #001092;
background-color: white;
}
pre {
font-family: Monaco, "Lucida Console", monospace;
font-size: 12px;
}
+
+ul.archive {
+ float: left;
+ list-style-type: none;
+ margin: 0 40px 0 0;
+}
+
+ul.archive li a {
+ font-weight: bold;
+}
diff --git a/test/test_models.rb b/test/test_models.rb
index 688bd25..6ee87ac 100644
--- a/test/test_models.rb
+++ b/test/test_models.rb
@@ -1,94 +1,122 @@
require File.join(File.dirname(__FILE__), 'test_helper')
class DeployTest < Test::Unit::TestCase
def setup
repository(:default) do
transaction = DataMapper::Transaction.new(repository)
transaction.begin
repository.adapter.push_transaction(transaction)
end
end
def teardown
repository(:default) do
while repository.adapter.current_transaction
repository.adapter.current_transaction.rollback
repository.adapter.pop_transaction
end
end
end
test 'number of changeset should be zero if zero changesets exist' do
deploy = Deploy.new(:scm_log => '')
assert_equal 0, deploy.get_number_of_changes
deploy = Deploy.new(:scm_log => nil)
assert_equal 0, deploy.get_number_of_changes
end
test 'number of changesets should be one for one changeset' do
deploy = Deploy.new(:scm_log => File.read('changesets/one_changeset.txt'))
assert_equal 1, deploy.get_number_of_changes
end
test 'number of changesets should be a lot for many changesets' do
deploy = Deploy.new(:scm_log => File.read('changesets/two_changesets.txt'))
assert_equal 2, deploy.get_number_of_changes
end
+ test 'group by date should return empty hash' do
+ project = create_project
+ assert_equal Hash.new, project.all_deploys_grouped_by_date
+ end
+
+ test 'should return deploys grouped by month' do
+ project = create_project
+ deploy1 = create_deploy(:project => project, :created_at => '2009-01-01')
+ deploy2 = create_deploy(:project => project, :created_at => '2009-01-02')
+ deploy3 = create_deploy(:project => project, :created_at => '2009-02-02')
+
+ grouped_deploys = project.all_deploys_grouped_by_date
+ assert_equal 2, grouped_deploys.keys.size
+ assert_equal [deploy2, deploy1], grouped_deploys['2009-01']
+ assert_equal [deploy3], grouped_deploys['2009-02']
+ end
+
+ test 'should find all deploys in a specific month' do
+ project = create_project
+ deploy1 = create_deploy(:project => project, :created_at => '2009-01-01')
+ deploy2 = create_deploy(:project => project, :created_at => '2009-01-31')
+ deploy3 = create_deploy(:project => project, :created_at => '2009-02-28')
+
+ assert_equal [deploy2, deploy1], Deploy.in_month('2009-01')
+ assert_equal [deploy3], Deploy.in_month('2009-02')
+ assert_equal [], Deploy.in_month('2009-03')
+ end
+
test 'should create multiple subscriptions' do
user = create_user
project1 = create_project(:name => 'project_1')
project2 = create_project(:name => 'project_2')
user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
user.reload
assert user.projects.include?(project1)
assert user.projects.include?(project2)
end
test 'should not create multiple subscriptions' do
user = create_user
project1 = create_project(:name => 'project_1')
project2 = create_project(:name => 'project_2')
create_subscription(:project => project1, :user => user)
user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
user.reload
assert_equal 2, user.subscriptions.size
assert user.projects.include?(project1)
assert user.projects.include?(project2)
end
test 'should create and destroy subscriptions' do
user = create_user
project1 = create_project(:name => 'project_1')
project2 = create_project(:name => 'project_2')
create_subscription(:project => project1, :user => user)
user.manage_subscriptions({ project2.id.to_s => 'on' })
user.reload
assert_equal 1, user.subscriptions.size
assert user.projects.include?(project2)
end
test 'should not email anything when there are no subscriptions' do
project = create_project
DeployMailer.expects(:send_by_smtp).never
project.deploys.create(:title => 'title', :user => 'user', :scm_log => 'log', :head_rev => '42', :current_rev => '23')
end
test 'should notify subscribers for a new deploy' do
project1 = create_project(:name => 'project_1')
project2 = create_project(:name => 'project_2')
create_subscription(:project => project1, :user => create_user(:email => '[email protected]'))
create_subscription(:project => project2, :user => create_user(:email => '[email protected]'))
DeployMailer.expects(:send_by_smtp).with(anything, anything, ['[email protected]']).once
project1.deploys.create(:title => 'title', :user => 'user', :scm_log => 'log', :head_rev => '42', :current_rev => '23')
end
end
diff --git a/views/deploys_list.erb b/views/deploys_list.erb
index 68fd804..be4dd48 100644
--- a/views/deploys_list.erb
+++ b/views/deploys_list.erb
@@ -1,10 +1,37 @@
+<div class="span-22">
+ <% for year in @years %>
+ <div class="span-6 append-bottom">
+ <h2><%= year %></h2>
+ <ul class="archive">
+ <li><%= link_to_month('December', "#{year}-12", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('November', "#{year}-11", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('October', "#{year}-10", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('September', "#{year}-09", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('August', "#{year}-08", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('July', "#{year}-07", @project, @grouped_deploys) %></li>
+ </ul>
+
+ <ul class="archive">
+ <li><%= link_to_month('June', "#{year}-06", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('May', "#{year}-05", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('April', "#{year}-04", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('March', "#{year}-03", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('February', "#{year}-02", @project, @grouped_deploys) %></li>
+ <li><%= link_to_month('January', "#{year}-01", @project, @grouped_deploys) %></li>
+ </ul>
+ </div>
+ <% end %>
+</div>
+
+<hr />
+
<table>
- <% @deploys.each_with_index do |deploy, i| %>
+ <% @last_deploys.each_with_index do |deploy, i| %>
<tr class="large <%= i % 2 == 0 ? 'even' : '' %>">
<td><a href="/deploys/<%= deploy.id %>"><%= deploy.title %></a> <span class="small">(<%= deploy.changes %> changes)</span></td>
<td>by <%= deploy.user %></td>
<td class="quiet"><%= format_time(deploy.created_at) %></td>
<td><%= deploy.project.name %></td>
</tr>
<% end %>
</table>
|
theflow/deployed_at
|
c848fdb8733cf19e11882cba372fef8c45afc1a3
|
use rack/test with webrat, the sinatra mode is deprecated
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 0978e8a..2e83bcb 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,47 +1,42 @@
$: << File.join(File.dirname(__FILE__), '..')
require 'rubygems'
require 'context'
require 'mocha'
-require 'webrat'
require 'deployed_at'
-Webrat.configure do |config|
- config.mode = :sinatra
-end
-
def create_user(attributes = {})
default_attributes = {
:email => '[email protected]'
}
User.create(default_attributes.merge(attributes))
end
def create_project(attributes = {})
default_attributes = {
:name => 'Test Project'
}
Project.create(default_attributes.merge(attributes))
end
def create_deploy(attributes = {})
default_attributes = {
:title => 'Test deploy',
:user => 'thedude',
:head_rev => '42',
:current_rev => '23',
:scm_log => File.read('changesets/two_changesets.txt'),
:project => create_project
}
Deploy.create(default_attributes.merge(attributes))
end
def create_subscription(attributes = {})
default_attributes = {
:project => create_project,
:user => create_user
}
Subscription.create(default_attributes.merge(attributes))
end
diff --git a/test/test_integration.rb b/test/test_integration.rb
index 8d90ab4..1b4cb16 100644
--- a/test/test_integration.rb
+++ b/test/test_integration.rb
@@ -1,75 +1,87 @@
require File.join(File.dirname(__FILE__), 'test_helper')
+require 'rack/test'
+require 'webrat'
+
+Webrat.configure do |config|
+ config.mode = :rack
+end
+
class IntegrationTest < Test::Unit::TestCase
+ include Rack::Test::Methods
include Webrat::Methods
include Webrat::Matchers
def setup
repository(:default) do
transaction = DataMapper::Transaction.new(repository)
transaction.begin
repository.adapter.push_transaction(transaction)
end
end
def teardown
repository(:default) do
while repository.adapter.current_transaction
repository.adapter.current_transaction.rollback
repository.adapter.pop_transaction
end
end
end
+ def app
+ Sinatra::Application
+ end
+
test 'should show the dashboard' do
project = create_project(:name => 'DeployedAt')
deploy = create_deploy(:title => 'First deploy', :user => 'thedude', :project => project)
visit '/'
assert_contain 'DeployedAt'
assert_contain 'thedude'
end
test 'should show a single project' do
project = create_project(:name => 'DeployedAt')
deploy = create_deploy(:title => 'First deploy', :user => 'thedude', :project => project)
visit "/projects/#{project.id}"
assert_contain 'DeployedAt'
assert_contain 'First deploy'
end
test 'should show a single deploy' do
deploy = create_deploy(:title => 'First deploy', :user => 'thedude')
visit "/deploys/#{deploy.id}"
assert_contain 'First deploy'
assert_contain 'thedude'
assert_contain 'changed some stuff'
end
test 'should subscriptions page should require a login' do
visit '/subscriptions'
assert_equal '/session', current_url
end
test 'logging in to access the subscriptions page' do
user = create_user(:email => '[email protected]')
project1 = create_project(:name => 'DeployedAt')
project2 = create_project(:name => 'The Dude')
create_subscription(:user => user, :project => project1)
# Login
visit '/subscriptions'
fill_in 'email', :with => '[email protected]'
click_button 'Log in'
# Subscription page
assert field_labeled('DeployedAt').checked?
assert !field_labeled('The Dude').checked?
end
end
|
theflow/deployed_at
|
b2fc4c774488a605682ec82c4d1efe4f573645eb
|
use factory methods also in the model tests
|
diff --git a/test/test_models.rb b/test/test_models.rb
index 2161ed7..688bd25 100644
--- a/test/test_models.rb
+++ b/test/test_models.rb
@@ -1,78 +1,94 @@
require File.join(File.dirname(__FILE__), 'test_helper')
class DeployTest < Test::Unit::TestCase
+ def setup
+ repository(:default) do
+ transaction = DataMapper::Transaction.new(repository)
+ transaction.begin
+ repository.adapter.push_transaction(transaction)
+ end
+ end
+
+ def teardown
+ repository(:default) do
+ while repository.adapter.current_transaction
+ repository.adapter.current_transaction.rollback
+ repository.adapter.pop_transaction
+ end
+ end
+ end
test 'number of changeset should be zero if zero changesets exist' do
deploy = Deploy.new(:scm_log => '')
assert_equal 0, deploy.get_number_of_changes
deploy = Deploy.new(:scm_log => nil)
assert_equal 0, deploy.get_number_of_changes
end
test 'number of changesets should be one for one changeset' do
deploy = Deploy.new(:scm_log => File.read('changesets/one_changeset.txt'))
assert_equal 1, deploy.get_number_of_changes
end
test 'number of changesets should be a lot for many changesets' do
deploy = Deploy.new(:scm_log => File.read('changesets/two_changesets.txt'))
assert_equal 2, deploy.get_number_of_changes
end
test 'should create multiple subscriptions' do
- user = User.create
- project1 = Project.create(:name => 'project_1')
- project2 = Project.create(:name => 'project_2')
+ user = create_user
+ project1 = create_project(:name => 'project_1')
+ project2 = create_project(:name => 'project_2')
user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
user.reload
assert user.projects.include?(project1)
assert user.projects.include?(project2)
end
test 'should not create multiple subscriptions' do
- user = User.create
- project1 = Project.create(:name => 'project_1')
- project2 = Project.create(:name => 'project_2')
- Subscription.create(:project => project1, :user => user)
+ user = create_user
+ project1 = create_project(:name => 'project_1')
+ project2 = create_project(:name => 'project_2')
+ create_subscription(:project => project1, :user => user)
user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
user.reload
assert_equal 2, user.subscriptions.size
assert user.projects.include?(project1)
assert user.projects.include?(project2)
end
test 'should create and destroy subscriptions' do
- user = User.create
- project1 = Project.create(:name => 'project_1')
- project2 = Project.create(:name => 'project_2')
- Subscription.create(:project => project1, :user => user)
+ user = create_user
+ project1 = create_project(:name => 'project_1')
+ project2 = create_project(:name => 'project_2')
+ create_subscription(:project => project1, :user => user)
user.manage_subscriptions({ project2.id.to_s => 'on' })
user.reload
assert_equal 1, user.subscriptions.size
assert user.projects.include?(project2)
end
test 'should not email anything when there are no subscriptions' do
- project = Project.create(:name => 'project_1')
+ project = create_project
DeployMailer.expects(:send_by_smtp).never
project.deploys.create(:title => 'title', :user => 'user', :scm_log => 'log', :head_rev => '42', :current_rev => '23')
end
test 'should notify subscribers for a new deploy' do
- project1 = Project.create(:name => 'project_1')
- project2 = Project.create(:name => 'project_2')
- Subscription.create(:project => project1, :user => User.create(:email => '[email protected]'))
- Subscription.create(:project => project2, :user => User.create(:email => '[email protected]'))
+ project1 = create_project(:name => 'project_1')
+ project2 = create_project(:name => 'project_2')
+ create_subscription(:project => project1, :user => create_user(:email => '[email protected]'))
+ create_subscription(:project => project2, :user => create_user(:email => '[email protected]'))
DeployMailer.expects(:send_by_smtp).with(anything, anything, ['[email protected]']).once
project1.deploys.create(:title => 'title', :user => 'user', :scm_log => 'log', :head_rev => '42', :current_rev => '23')
end
end
|
theflow/deployed_at
|
3812d68fa3dc979e42e0a6b7b7b0ce6eec903b91
|
added webrat.log to gitignore
|
diff --git a/.gitignore b/.gitignore
index 24cbc37..5ed2878 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
database.sqlite3
config.yml
+webrat.log
.DS_Store
|
theflow/deployed_at
|
36ea41248eb01610da90ae415e737ee36d36b084
|
added some basic acceptance tests using webrat
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 2e83bcb..0978e8a 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,42 +1,47 @@
$: << File.join(File.dirname(__FILE__), '..')
require 'rubygems'
require 'context'
require 'mocha'
+require 'webrat'
require 'deployed_at'
+Webrat.configure do |config|
+ config.mode = :sinatra
+end
+
def create_user(attributes = {})
default_attributes = {
:email => '[email protected]'
}
User.create(default_attributes.merge(attributes))
end
def create_project(attributes = {})
default_attributes = {
:name => 'Test Project'
}
Project.create(default_attributes.merge(attributes))
end
def create_deploy(attributes = {})
default_attributes = {
:title => 'Test deploy',
:user => 'thedude',
:head_rev => '42',
:current_rev => '23',
:scm_log => File.read('changesets/two_changesets.txt'),
:project => create_project
}
Deploy.create(default_attributes.merge(attributes))
end
def create_subscription(attributes = {})
default_attributes = {
:project => create_project,
:user => create_user
}
Subscription.create(default_attributes.merge(attributes))
end
diff --git a/test/test_integration.rb b/test/test_integration.rb
new file mode 100644
index 0000000..8d90ab4
--- /dev/null
+++ b/test/test_integration.rb
@@ -0,0 +1,75 @@
+require File.join(File.dirname(__FILE__), 'test_helper')
+
+class IntegrationTest < Test::Unit::TestCase
+ include Webrat::Methods
+ include Webrat::Matchers
+
+ def setup
+ repository(:default) do
+ transaction = DataMapper::Transaction.new(repository)
+ transaction.begin
+ repository.adapter.push_transaction(transaction)
+ end
+ end
+
+ def teardown
+ repository(:default) do
+ while repository.adapter.current_transaction
+ repository.adapter.current_transaction.rollback
+ repository.adapter.pop_transaction
+ end
+ end
+ end
+
+ test 'should show the dashboard' do
+ project = create_project(:name => 'DeployedAt')
+ deploy = create_deploy(:title => 'First deploy', :user => 'thedude', :project => project)
+
+ visit '/'
+
+ assert_contain 'DeployedAt'
+ assert_contain 'thedude'
+ end
+
+ test 'should show a single project' do
+ project = create_project(:name => 'DeployedAt')
+ deploy = create_deploy(:title => 'First deploy', :user => 'thedude', :project => project)
+
+ visit "/projects/#{project.id}"
+
+ assert_contain 'DeployedAt'
+ assert_contain 'First deploy'
+ end
+
+ test 'should show a single deploy' do
+ deploy = create_deploy(:title => 'First deploy', :user => 'thedude')
+
+ visit "/deploys/#{deploy.id}"
+
+ assert_contain 'First deploy'
+ assert_contain 'thedude'
+ assert_contain 'changed some stuff'
+ end
+
+ test 'should subscriptions page should require a login' do
+ visit '/subscriptions'
+
+ assert_equal '/session', current_url
+ end
+
+ test 'logging in to access the subscriptions page' do
+ user = create_user(:email => '[email protected]')
+ project1 = create_project(:name => 'DeployedAt')
+ project2 = create_project(:name => 'The Dude')
+ create_subscription(:user => user, :project => project1)
+
+ # Login
+ visit '/subscriptions'
+ fill_in 'email', :with => '[email protected]'
+ click_button 'Log in'
+
+ # Subscription page
+ assert field_labeled('DeployedAt').checked?
+ assert !field_labeled('The Dude').checked?
+ end
+end
|
theflow/deployed_at
|
edaec6d0fb237ba84584fcc8ad931be6f5856847
|
correctly mark the checkbox as checked
|
diff --git a/views/subscriptions_list.erb b/views/subscriptions_list.erb
index 4551d59..04fc67c 100644
--- a/views/subscriptions_list.erb
+++ b/views/subscriptions_list.erb
@@ -1,18 +1,18 @@
<div class="span-22 prepend-1 append-1 prepend-top">
<h4>Whenever a deploy is recorded for one of your subscribed projects, you'll get an email.</h4>
<form action="/subscriptions" method="post">
<% for project in @projects %>
<div class="span-2">
- <input type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="true"' if @subscribed_projects.include?(project) %>>
+ <input type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="checked"' if @subscribed_projects.include?(project) %>>
</div>
<div class="span-18">
<label for="project_<%= project.id %>"><%= project.name %></label>
</div>
<% end %>
<div class="span-20 prepend-top">
<input type="submit" value="Save your subscriptions"/>
</div>
</form>
</div>
|
theflow/deployed_at
|
15ecb0f7f66971c789c5805a334f6720b3c9c76c
|
some basic factory methods for tests
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 48d75e0..2e83bcb 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,7 +1,42 @@
$: << File.join(File.dirname(__FILE__), '..')
require 'rubygems'
require 'context'
require 'mocha'
require 'deployed_at'
+
+
+def create_user(attributes = {})
+ default_attributes = {
+ :email => '[email protected]'
+ }
+ User.create(default_attributes.merge(attributes))
+end
+
+def create_project(attributes = {})
+ default_attributes = {
+ :name => 'Test Project'
+ }
+ Project.create(default_attributes.merge(attributes))
+end
+
+def create_deploy(attributes = {})
+ default_attributes = {
+ :title => 'Test deploy',
+ :user => 'thedude',
+ :head_rev => '42',
+ :current_rev => '23',
+ :scm_log => File.read('changesets/two_changesets.txt'),
+ :project => create_project
+ }
+ Deploy.create(default_attributes.merge(attributes))
+end
+
+def create_subscription(attributes = {})
+ default_attributes = {
+ :project => create_project,
+ :user => create_user
+ }
+ Subscription.create(default_attributes.merge(attributes))
+end
|
theflow/deployed_at
|
6eb07d883c42e3877b394ef809a8f1f2f02bbf75
|
added rackup file
|
diff --git a/config.ru b/config.ru
new file mode 100644
index 0000000..f2539af
--- /dev/null
+++ b/config.ru
@@ -0,0 +1,3 @@
+require 'deployed_at'
+
+run Sinatra::Application
|
theflow/deployed_at
|
6ff3e3042cc78fcf16c3221d0086bd6207c820fd
|
a little bit of styling love
|
diff --git a/views/session_show.erb b/views/session_show.erb
index 10a4641..9e6f417 100644
--- a/views/session_show.erb
+++ b/views/session_show.erb
@@ -1,5 +1,5 @@
<form action="/session" method="post">
- <label for="email">Email address:</label>
+ <label for="email">Your email address:</label>
<input id="email" name="email" type="text" value=""/>
- <input id="register" type="submit" value="Register"/>
+ <input id="register" type="submit" value="Log in"/>
</form>
diff --git a/views/subscriptions_list.erb b/views/subscriptions_list.erb
index 6deded3..4551d59 100644
--- a/views/subscriptions_list.erb
+++ b/views/subscriptions_list.erb
@@ -1,13 +1,18 @@
<div class="span-22 prepend-1 append-1 prepend-top">
- <form action="/subscriptions" method="post">
+ <h4>Whenever a deploy is recorded for one of your subscribed projects, you'll get an email.</h4>
+ <form action="/subscriptions" method="post">
<% for project in @projects %>
- <input class="span-2" type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="true"' if @subscribed_projects.include?(project) %>>
- <label class="span-20" for="project_<%= project.id %>"><%= project.name %></label>
+ <div class="span-2">
+ <input type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="true"' if @subscribed_projects.include?(project) %>>
+ </div>
+ <div class="span-18">
+ <label for="project_<%= project.id %>"><%= project.name %></label>
+ </div>
<% end %>
- <div class="prepend-top">
- <input type="submit" value="Save"/>
+ <div class="span-20 prepend-top">
+ <input type="submit" value="Save your subscriptions"/>
</div>
</form>
</div>
|
theflow/deployed_at
|
1312c6f9db7735e1d18532ad1000a3184a724295
|
added a dashboard overview page
|
diff --git a/deployed_at.rb b/deployed_at.rb
index f1532af..764c5d0 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,224 +1,222 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
require 'net/smtp'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
after :save, :notify
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
def notify
DeployMailer.send(project, current_rev, head_rev, scm_log)
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
def manage_subscriptions(param_hash)
subscriptions.clear
subscriptions.save
param_hash.keys.each do |project_id|
subscriptions.create(:project_id => project_id)
end
end
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
class DeployMailer
class << self
attr_accessor :config
end
def self.send(project, current_rev, head_rev, svn_log)
recipients = project.users.map { |u| u.email }
return if recipients.empty?
message_body = format_msg(project.name, current_rev, head_rev, svn_log)
send_by_smtp(message_body, 'DeployedAt <[email protected]>', recipients)
end
def self.send_by_smtp(body, from, to)
Net::SMTP.start(config[:host], config[:port], 'localhost', config[:user], config[:pass], config[:auth]) do |smtp|
smtp.send_message(body, from, to)
end
end
def self.format_msg(project_name, current_rev, head_rev, svn_log)
msg = <<END_OF_MESSAGE
From: DeployedIt <[email protected]>
To: DeployedIt <[email protected]>
Subject: [DeployedIt] #{project_name} deploy
* Deployment started at #{Time.now}
* Changes in this deployment:
#{svn_log}
END_OF_MESSAGE
end
end
CONFIG_FILE = File.join(File.dirname(__FILE__), 'config.yml')
if File.exist?(CONFIG_FILE)
DeployMailer.config = YAML::load_file(CONFIG_FILE)['smtp_settings']
else
puts ' Please create a config file by copying the example config:'
puts ' $ cp config.example.yml config.yml'
exit
end
DataMapper.auto_upgrade!
get '/' do
- if @projects.size == 0
- @title = "Deployed It!"
- erb "<p>No deploys recorded yet</p>"
- else
- redirect "/projects/#{@projects.first.id}"
- end
+ @deploys = Deploy.all(:order => [:created_at.desc], :limit => 15)
+
+ @title = 'Recent deploys'
+ erb :dashboard
end
get '/projects/:id' do
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :deploys_list
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :deploys_show
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
redirect '/session' and return if logged_out?
@subscribed_projects = current_user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
redirect '/session' and return if logged_out?
current_user.manage_subscriptions(params)
redirect 'subscriptions'
end
before do
@projects = Project.all if request.get?
end
helpers do
def logged_out?
session[:user_id].blank?
end
def current_user
@user ||= User.get(session[:user_id])
end
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
diff --git a/public/deployed_at.css b/public/deployed_at.css
index ac1b395..1eb5868 100644
--- a/public/deployed_at.css
+++ b/public/deployed_at.css
@@ -1,27 +1,32 @@
body {
margin:1.5em 0;
}
+#main_nav {
+ float: right;
+ font-weight: bold;
+}
+
#project_nav {
margin: 0 0 10px 1px;
}
#project_nav a {
text-decoration: none;
background-color: #381392;
border: 1px solid #381392;
color: white;
padding: 2px 5px;
margin-right: 5px;
}
#project_nav a:hover,
#project_nav a.active {
color: #001092;
background-color: white;
}
pre {
font-family: Monaco, "Lucida Console", monospace;
font-size: 12px;
}
diff --git a/views/dashboard.erb b/views/dashboard.erb
new file mode 100644
index 0000000..93b7438
--- /dev/null
+++ b/views/dashboard.erb
@@ -0,0 +1,13 @@
+<% if @deploys.empty? %>
+ <p>No deploys recorded yet</p>
+<% else %>
+ <table>
+ <% @deploys.each do |deploy| %>
+ <tr>
+ <td width="15%"><%= format_time(deploy.created_at) %></td>
+ <td><%= deploy.user %> deployed <%= deploy.project.name %></td>
+ <td width="20%"><a href="/deploys/<%= deploy.id %>">show details »</a></td>
+ </tr>
+ <% end %>
+ </table>
+<% end %>
\ No newline at end of file
diff --git a/views/layout.erb b/views/layout.erb
index ba5e6c0..949ccc5 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -1,25 +1,28 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= @title || 'Deployed It!' %></title>
<link type="text/css" href="/blueprint/blueprint/screen.css" rel="stylesheet" media="screen"/>
<link type="text/css" href="/deployed_at.css" rel="stylesheet" media="screen"/>
</head>
<body>
<div class="container">
+ <div id="main_nav">
+ <a href="/">Dashboard</a> | <a href="/subscriptions">Subscriptions</a>
+ </div>
<h1><%= @title %></h1>
<p id="project_nav">
<% if @projects.size > 1 %>
<% for project in @projects %>
<a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
<% end %>
<% end %>
</p>
<hr />
<%= yield %>
</div>
</body>
</html>
\ No newline at end of file
|
theflow/deployed_at
|
6524d956a8d07bea4e62c83f26f1ac29e06f7039
|
ignore config.yml files
|
diff --git a/.gitignore b/.gitignore
index de6cb5d..24cbc37 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
database.sqlite3
+config.yml
.DS_Store
|
theflow/deployed_at
|
5026a70c29d704c923103998d22fc40c17a89948
|
send an email to all subscribers of a project
|
diff --git a/config.example.yml b/config.example.yml
new file mode 100644
index 0000000..59e5b13
--- /dev/null
+++ b/config.example.yml
@@ -0,0 +1,6 @@
+smtp_settings:
+ host: your.mailserver.com
+ port: 25
+ auth: :login
+ user: account_name
+ pass: account_password
diff --git a/deployed_at.rb b/deployed_at.rb
index 605de52..f1532af 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,171 +1,224 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
+require 'net/smtp'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
+ after :save, :notify
+
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
+
+ def notify
+ DeployMailer.send(project, current_rev, head_rev, scm_log)
+ end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
def manage_subscriptions(param_hash)
subscriptions.clear
subscriptions.save
param_hash.keys.each do |project_id|
subscriptions.create(:project_id => project_id)
end
end
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
+class DeployMailer
+ class << self
+ attr_accessor :config
+ end
+
+ def self.send(project, current_rev, head_rev, svn_log)
+ recipients = project.users.map { |u| u.email }
+ return if recipients.empty?
+
+ message_body = format_msg(project.name, current_rev, head_rev, svn_log)
+ send_by_smtp(message_body, 'DeployedAt <[email protected]>', recipients)
+ end
+
+ def self.send_by_smtp(body, from, to)
+ Net::SMTP.start(config[:host], config[:port], 'localhost', config[:user], config[:pass], config[:auth]) do |smtp|
+ smtp.send_message(body, from, to)
+ end
+ end
+
+ def self.format_msg(project_name, current_rev, head_rev, svn_log)
+ msg = <<END_OF_MESSAGE
+From: DeployedIt <[email protected]>
+To: DeployedIt <[email protected]>
+Subject: [DeployedIt] #{project_name} deploy
+
+
+* Deployment started at #{Time.now}
+
+* Changes in this deployment:
+
+#{svn_log}
+
+END_OF_MESSAGE
+ end
+end
+
+CONFIG_FILE = File.join(File.dirname(__FILE__), 'config.yml')
+
+if File.exist?(CONFIG_FILE)
+ DeployMailer.config = YAML::load_file(CONFIG_FILE)['smtp_settings']
+else
+ puts ' Please create a config file by copying the example config:'
+ puts ' $ cp config.example.yml config.yml'
+ exit
+end
+
DataMapper.auto_upgrade!
get '/' do
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :deploys_list
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :deploys_show
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
redirect '/session' and return if logged_out?
@subscribed_projects = current_user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
redirect '/session' and return if logged_out?
current_user.manage_subscriptions(params)
redirect 'subscriptions'
end
before do
@projects = Project.all if request.get?
end
helpers do
def logged_out?
session[:user_id].blank?
end
def current_user
@user ||= User.get(session[:user_id])
end
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 180fa65..48d75e0 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,6 +1,7 @@
$: << File.join(File.dirname(__FILE__), '..')
require 'rubygems'
require 'context'
+require 'mocha'
require 'deployed_at'
diff --git a/test/test_models.rb b/test/test_models.rb
index c7f8b7f..2161ed7 100644
--- a/test/test_models.rb
+++ b/test/test_models.rb
@@ -1,62 +1,78 @@
require File.join(File.dirname(__FILE__), 'test_helper')
class DeployTest < Test::Unit::TestCase
test 'number of changeset should be zero if zero changesets exist' do
deploy = Deploy.new(:scm_log => '')
assert_equal 0, deploy.get_number_of_changes
deploy = Deploy.new(:scm_log => nil)
assert_equal 0, deploy.get_number_of_changes
end
test 'number of changesets should be one for one changeset' do
deploy = Deploy.new(:scm_log => File.read('changesets/one_changeset.txt'))
assert_equal 1, deploy.get_number_of_changes
end
test 'number of changesets should be a lot for many changesets' do
deploy = Deploy.new(:scm_log => File.read('changesets/two_changesets.txt'))
assert_equal 2, deploy.get_number_of_changes
end
test 'should create multiple subscriptions' do
user = User.create
project1 = Project.create(:name => 'project_1')
project2 = Project.create(:name => 'project_2')
user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
user.reload
assert user.projects.include?(project1)
assert user.projects.include?(project2)
end
test 'should not create multiple subscriptions' do
user = User.create
project1 = Project.create(:name => 'project_1')
project2 = Project.create(:name => 'project_2')
Subscription.create(:project => project1, :user => user)
user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
user.reload
assert_equal 2, user.subscriptions.size
assert user.projects.include?(project1)
assert user.projects.include?(project2)
end
test 'should create and destroy subscriptions' do
user = User.create
project1 = Project.create(:name => 'project_1')
project2 = Project.create(:name => 'project_2')
Subscription.create(:project => project1, :user => user)
user.manage_subscriptions({ project2.id.to_s => 'on' })
user.reload
assert_equal 1, user.subscriptions.size
assert user.projects.include?(project2)
end
-end
\ No newline at end of file
+ test 'should not email anything when there are no subscriptions' do
+ project = Project.create(:name => 'project_1')
+
+ DeployMailer.expects(:send_by_smtp).never
+ project.deploys.create(:title => 'title', :user => 'user', :scm_log => 'log', :head_rev => '42', :current_rev => '23')
+ end
+
+ test 'should notify subscribers for a new deploy' do
+ project1 = Project.create(:name => 'project_1')
+ project2 = Project.create(:name => 'project_2')
+ Subscription.create(:project => project1, :user => User.create(:email => '[email protected]'))
+ Subscription.create(:project => project2, :user => User.create(:email => '[email protected]'))
+
+ DeployMailer.expects(:send_by_smtp).with(anything, anything, ['[email protected]']).once
+ project1.deploys.create(:title => 'title', :user => 'user', :scm_log => 'log', :head_rev => '42', :current_rev => '23')
+ end
+end
|
theflow/deployed_at
|
2901c712c7b38570f99407b5963b0c1d1f8f5097
|
this param actually changed a while ago
|
diff --git a/client.rb b/client.rb
index e6f72ee..aa8d712 100644
--- a/client.rb
+++ b/client.rb
@@ -1,24 +1,24 @@
#!/usr/bin/ruby
require 'net/http'
require 'uri'
require 'cgi'
class DeployedItClient
def initialize(service_root)
@service_root = service_root
end
def new_deploy(user, title)
deploy_body = File.read('test/changesets/two_changesets.txt')
args = {'user' => user,
'title' => title,
- 'body' => deploy_body,
+ 'scm_log' => deploy_body,
'project' => 'Main App' }
url = URI.parse(@service_root + '/deploys')
Net::HTTP.post_form(url, args)
end
end
client = DeployedItClient.new('http://localhost:4567')
client.new_deploy(ENV['USER'], ARGV.first)
|
theflow/deployed_at
|
995a35facda65289b6819bf5761c35b4cbb84f8b
|
use a before filter to load projects
|
diff --git a/deployed_at.rb b/deployed_at.rb
index 6783ea4..605de52 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,169 +1,171 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
def manage_subscriptions(param_hash)
subscriptions.clear
subscriptions.save
param_hash.keys.each do |project_id|
subscriptions.create(:project_id => project_id)
end
end
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
DataMapper.auto_upgrade!
get '/' do
- @projects = Project.all
-
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
- @projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :deploys_list
end
get '/deploys/:id' do
- @projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :deploys_show
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
- @projects = Project.all
-
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
- @projects = Project.all
- redirect 'session' and return if session[:user_id].blank?
+ redirect '/session' and return if logged_out?
+
+ @subscribed_projects = current_user.projects
- @user = User.get(session[:user_id])
- @subscribed_projects = @user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
- redirect 'session' and return if session[:user_id].blank?
-
- @user = User.get(session[:user_id])
- @user.manage_subscriptions(params)
+ redirect '/session' and return if logged_out?
+ current_user.manage_subscriptions(params)
redirect 'subscriptions'
end
+before do
+ @projects = Project.all if request.get?
+end
helpers do
+ def logged_out?
+ session[:user_id].blank?
+ end
+
+ def current_user
+ @user ||= User.get(session[:user_id])
+ end
+
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
|
theflow/deployed_at
|
672000ad86909eaebe88cf0a2ac880bba0b9c9b9
|
renamed views to be more uniform
|
diff --git a/deployed_at.rb b/deployed_at.rb
index 74cc0a9..6783ea4 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,169 +1,169 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
def manage_subscriptions(param_hash)
subscriptions.clear
subscriptions.save
param_hash.keys.each do |project_id|
subscriptions.create(:project_id => project_id)
end
end
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
- erb :list_deploys
+ erb :deploys_list
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
- erb :show_deploy
+ erb :deploys_show
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@projects = Project.all
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
@projects = Project.all
redirect 'session' and return if session[:user_id].blank?
@user = User.get(session[:user_id])
@subscribed_projects = @user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
redirect 'session' and return if session[:user_id].blank?
@user = User.get(session[:user_id])
@user.manage_subscriptions(params)
redirect 'subscriptions'
end
helpers do
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
diff --git a/views/list_deploys.erb b/views/deploys_list.erb
similarity index 100%
rename from views/list_deploys.erb
rename to views/deploys_list.erb
diff --git a/views/show_deploy.erb b/views/deploys_show.erb
similarity index 100%
rename from views/show_deploy.erb
rename to views/deploys_show.erb
|
theflow/deployed_at
|
f37fcad43db06899414a108d290240bb6e6e1053
|
no need to require sinata, these are unit tests only
|
diff --git a/test/test_helper.rb b/test/test_helper.rb
index fcda8b6..180fa65 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,8 +1,6 @@
$: << File.join(File.dirname(__FILE__), '..')
require 'rubygems'
require 'context'
-require 'sinatra'
-require 'sinatra/test/unit'
require 'deployed_at'
diff --git a/test/test_deployedat.rb b/test/test_models.rb
similarity index 100%
rename from test/test_deployedat.rb
rename to test/test_models.rb
|
theflow/deployed_at
|
1554710f820f6d45d662ead6875db036155869da
|
make it possible to subscribe and unsubscribe projects
|
diff --git a/deployed_at.rb b/deployed_at.rb
index a73231b..74cc0a9 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,156 +1,169 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
has n, :subscriptions
has n, :users, :through => :subscriptions
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
has n, :subscriptions
has n, :projects, :through => :subscriptions
+ def manage_subscriptions(param_hash)
+ subscriptions.clear
+ subscriptions.save
+ param_hash.keys.each do |project_id|
+ subscriptions.create(:project_id => project_id)
+ end
+ end
+
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
class Subscription
include DataMapper::Resource
property :id, Integer, :serial => true
belongs_to :project
belongs_to :user
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :list_deploys
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@projects = Project.all
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
get '/subscriptions' do
@projects = Project.all
redirect 'session' and return if session[:user_id].blank?
@user = User.get(session[:user_id])
@subscribed_projects = @user.projects
@title = 'Your subscriptions'
erb :subscriptions_list
end
post '/subscriptions' do
- p param
+ redirect 'session' and return if session[:user_id].blank?
+
+ @user = User.get(session[:user_id])
+ @user.manage_subscriptions(params)
+
+ redirect 'subscriptions'
end
helpers do
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
diff --git a/test/test_deployedat.rb b/test/test_deployedat.rb
index 9fd382b..c7f8b7f 100644
--- a/test/test_deployedat.rb
+++ b/test/test_deployedat.rb
@@ -1,23 +1,62 @@
require File.join(File.dirname(__FILE__), 'test_helper')
class DeployTest < Test::Unit::TestCase
test 'number of changeset should be zero if zero changesets exist' do
deploy = Deploy.new(:scm_log => '')
assert_equal 0, deploy.get_number_of_changes
deploy = Deploy.new(:scm_log => nil)
assert_equal 0, deploy.get_number_of_changes
end
test 'number of changesets should be one for one changeset' do
deploy = Deploy.new(:scm_log => File.read('changesets/one_changeset.txt'))
assert_equal 1, deploy.get_number_of_changes
end
test 'number of changesets should be a lot for many changesets' do
deploy = Deploy.new(:scm_log => File.read('changesets/two_changesets.txt'))
assert_equal 2, deploy.get_number_of_changes
end
+ test 'should create multiple subscriptions' do
+ user = User.create
+ project1 = Project.create(:name => 'project_1')
+ project2 = Project.create(:name => 'project_2')
+
+ user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
+
+ user.reload
+ assert user.projects.include?(project1)
+ assert user.projects.include?(project2)
+ end
+
+ test 'should not create multiple subscriptions' do
+ user = User.create
+ project1 = Project.create(:name => 'project_1')
+ project2 = Project.create(:name => 'project_2')
+ Subscription.create(:project => project1, :user => user)
+
+ user.manage_subscriptions({ project1.id.to_s => 'on', project2.id.to_s => 'on' })
+
+ user.reload
+ assert_equal 2, user.subscriptions.size
+ assert user.projects.include?(project1)
+ assert user.projects.include?(project2)
+ end
+
+ test 'should create and destroy subscriptions' do
+ user = User.create
+ project1 = Project.create(:name => 'project_1')
+ project2 = Project.create(:name => 'project_2')
+ Subscription.create(:project => project1, :user => user)
+
+ user.manage_subscriptions({ project2.id.to_s => 'on' })
+
+ user.reload
+ assert_equal 1, user.subscriptions.size
+ assert user.projects.include?(project2)
+ end
+
end
\ No newline at end of file
|
theflow/deployed_at
|
e607d713bd5a9f5f54807b8ed62ab462831bbf12
|
improved layout for subscriptions
|
diff --git a/views/subscriptions_list.erb b/views/subscriptions_list.erb
index fbd77be..6deded3 100644
--- a/views/subscriptions_list.erb
+++ b/views/subscriptions_list.erb
@@ -1,16 +1,13 @@
-<form action="/subscriptions" method="post">
+<div class="span-22 prepend-1 append-1 prepend-top">
+ <form action="/subscriptions" method="post">
- <% for project in @projects %>
- <div class="span-1 prepend-1">
- <input type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="true"' if @subscribed_projects.include?(project) %>>
- </div>
- <div class="span-22 last">
- <label for="project_<%= project.id %>"><%= project.name %></label>
- </div>
- <% end %>
+ <% for project in @projects %>
+ <input class="span-2" type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="true"' if @subscribed_projects.include?(project) %>>
+ <label class="span-20" for="project_<%= project.id %>"><%= project.name %></label>
+ <% end %>
- <div class="span-1 prepend-1">
- <input type="submit" value="Save"/>
- </div>
-
-</form>
+ <div class="prepend-top">
+ <input type="submit" value="Save"/>
+ </div>
+ </form>
+</div>
|
theflow/deployed_at
|
2ed05baa3fd885c905b7bdf17030eab405a287ba
|
body margin changed with new blueprint
|
diff --git a/public/deployed_at.css b/public/deployed_at.css
index 22a8e49..ac1b395 100644
--- a/public/deployed_at.css
+++ b/public/deployed_at.css
@@ -1,23 +1,27 @@
+body {
+ margin:1.5em 0;
+}
+
#project_nav {
margin: 0 0 10px 1px;
}
#project_nav a {
text-decoration: none;
background-color: #381392;
border: 1px solid #381392;
color: white;
padding: 2px 5px;
margin-right: 5px;
}
#project_nav a:hover,
#project_nav a.active {
color: #001092;
background-color: white;
}
pre {
font-family: Monaco, "Lucida Console", monospace;
font-size: 12px;
}
|
theflow/deployed_at
|
d7dc08d68f4d78401da2ff1aca4c89e5783c36ac
|
new blueprint version
|
diff --git a/public/blueprint/AUTHORS.textile b/public/blueprint/AUTHORS.textile
index 0ecc545..ac81632 100755
--- a/public/blueprint/AUTHORS.textile
+++ b/public/blueprint/AUTHORS.textile
@@ -1,34 +1,38 @@
h1. Blueprint CSS Framework Authors and Contributors
Blueprint is based on the work of many talented people. It is
through their good intentions we are allowed to use many of the
techniques found in the framework.
(However, remember that the original authors are not maintaing
the framework, so please don't waste their or your time on
asking them for help or support.)
h2. Original CSS authors
The grid and typography is based on work by:
* "Jeff Croft":http://jeffcroft.com
* "Nathan Borror":http://www.playgroundblues.com
* "Christian Metts":http://mintchaos.com
* "Wilson Miner":http://www.wilsonminer.com
The CSS reset is based on work by:
* "Eric Meyer":http://www.meyerweb.com/eric
The Fancy Type plugin is based on work by:
* "Mark Boulton":http://www.markboulton.co.uk
* "Typogrify":http://typogrify.googlecode.com
h2. Current Team
-Admin:
-* "Olav Bjorkoy":http://bjorkoy.com
+Blueprint was realized and maintained through version 0.7.1 by
+"Olav Bjorkoy":http://bjorkoy.com who has sinced passed the torch
+to the current team. They are:
-Contributors:
+Admins:
+* "Christian Montoya":http://christianmontoya.com
* "Josh Clayton":http://jdclayton.com
-* "Kim Joar Bekkelund":http://www.kimjoar.net
-* "Glenn Rempe":http://blog.rempe.us/
\ No newline at end of file
+
+Contributors:
+* "Glenn Rempe":http://blog.rempe.us/
+* Chris Eppstein
\ No newline at end of file
diff --git a/public/blueprint/CHANGELOG b/public/blueprint/CHANGELOG
index 1dcf5e0..5f55418 100755
--- a/public/blueprint/CHANGELOG
+++ b/public/blueprint/CHANGELOG
@@ -1,141 +1,150 @@
Blueprint CSS Framework Change Log
----------------------------------------------------------------
-Version 0.7.1 - Date 21/02/2008
+Version 0.8 - Date November 11, 2008
+--
+ New features:
+ * Much of the flexibility of 0.6 has been pushed back into the core [CMM]
+ * Plugins from 0.6 are now back in the core [CMM]
+
+ Bug fixes:
+ * Lots. See http://blueprintcss.lighthouseapp.com/projects/15318-blueprint-css
+
+
+Version 0.7.1 - Date February 21, 2008
--
New features:
* Rubydoc for compressor [JC]
- *
Bug fixes:
* Fixed bug in the compressor related to Rubygems. [JC]
* <tt> should be inline, not block. [OFB]
-Version 0.7 - Date 19/02/2008
+Version 0.7 - February 19, 2008
--
New features:
* New directory structure. [OFB]
* New compressor script. [JC]
* Ability to set custom namespace for BP classes. [JC]
* Optional custom column count and widths. [JC]
* Ability to add your own CSS files. [JC]
* Custom output paths. [JC]
* Support for multiple projects. [JC]
* Semantic class naming from CSS rules. [JC]
* Automatic compression for plugins. [JC]
* Compressed version of ie.css. [OFB]
* Alternating table row colors. [OFB]
* Added class .showgrid to see the grid of any column or container. [OFB]
* No need for .column! You now have to use divs for columns,
but you can still use span/prepend/append for other elements as well.
In other words, div.span-x now implies that the element is a .column. [OFB]
Bug fixes:
* Sidebar alignment in tests/sample.html. [OFB]
* Line-height on sub/sup. [OFB]
* Clearfix not properly applied to container. [OFB]
* Misc validation errors in tests. [OFB]
* Proper margin on address. [OFB]
* Unwanted bottom margin on nested lists. [OFB]
* Form labels with unwanted fancy-type indentation. [OFB]
* Proper margin on all form elements. [OFB]
* No margins for images in headings. [OFB]
* Push-x bottom margin. [OFB]
* Vertical align set to middle on tables. [OFB]
* Improved .notice, .error and .success color contrast. [OFB]
* Size of input[text]. [OFB]
* Baseline alignment of <h4>. [OFB]
Misc:
* Improved structure in print.css. [OFB]
* Dual-licensed under MIT and GPL licenses. [OFB]
* Changed name of .clear to .clearfix, and added .clear (clear:both;). [OFB]
-Version 0.6 - 21/9/2007
+Version 0.6 - September 21, 2007
--
* Created a new plugin, "iepngfix", that adds support for PNG transparency in IE5.5+ [OFB]
* Added an IE stylesheet, updated the test files and the readme accordingly [OFB]
* Re-added improved support for em units [OFB]
* Lots of minor changes to typography.css and reset.css, provided by Christian Montoya [OFB]
* Extracted the fancy typography section in typography.css to a new plugin [OFB]
* Extracted the support for CSS buttons into a new plugin. [OFB]
* Added new plugin structure. [OFB]
* Changed some default fonts so that BP works better with ClearType in XP [OFB]
* Re-added the hack for clearing floats without extra markup. [OFB]
* Added Changelog.txt to track changes in each release. [GR]
* Cleaned up and rationalized SVN dir structure. [GR, OFB]
* print.css : removed reference to 'baseline.png' as it no longer exists. [GR]
* grid.css : removed reference to '.first' css class as it no longer exists. [GR]
* Added append-13 to append-23 and prepend-13 to prepend-23 to allow pushing elements
to both extreme sides of the grid. Added test cases to tests/grid.css [GR]
* Moved test sample files to blueprint/tests sub-directory so tests stay with the code. [GR]
* Consolidated all references to release version number to screen.css [OFB]
* Added ruby script (generate_compressed_css.rb) to scripts dir, and 'csstidy' binary (OS X Universal)
for generating tidied version of Blueprint (lib/compressed.css).
* Consolidated test pages into one single page (test.html). Uses compressed stylesheet by default. This ensures test of
the chain of generation. (todo) Intention is to delete other test files if single file works well. (todo) ensure singular
test file contains latest changes to other test files. [GR]
* Moved the blueprint framework to its own folder in the package, so that the tests, script,
license and readme don't clutter up our BP folder. [OFB]
* Re-saved grid.png with Photoshop to remove Fireworks data which was bloating it.
Now its about 3KB instead of 40+KB. Resolves Issue 22. [GR]
* Moved compressed files to new compressed dir [OFB]
* print.css is now also being generated by the compressor ruby script and is available for use.
* Added new script 'validate_css.rb' which will validate all css files and present a report with
a local java binary of the W3C validator.
* Created an experimental CSS classes plugin, by popular demand. [OFB]
* Improved handling of multi-line headings. [OFB]
* Improved styling of <table>s, you may now use .span classes on <th>s to create tables that follow the grid. [OFB]
* Added support for indented paragraphs to the Fancy-type plugin. [OFB]
* Added a new plugin: link-icons. [OFB]
* Seperated the plugins tests into their own file. [OFB]
* Re-structured some of the tests.html sections. [OFB]
* Added class ".colborder" to grid.css. [OFB]
* Added .error, .notice and .success classes to typography.css. [OFB]
* Added tests for more elements which gets reset in reset.css [OFB, GR]
* Added forms.css, awaiting implementation. Moved form styling from typography.css [OFB]
* Updated compressor script to include forms.css [OFB]
* Improved forms.html tests for upcoming forms.css implementation. This will change based on the
markup that forms.css will use. [OFB]
* Fixed clearing image in button element bug in buttons.css [OFB]
* Fixed bug where IE6 clips pushed/pulled elements. [OFB]
* Fixed typo in grid.css formula. [OFB]
* Fixed varying formatting across core files. [OFB]
* Fixed legend element in IE6. [OFB]
* Fixed indentation in test files. [OFB]
* Removed tests for plugins not bundled with the next release. [OFB]
* Improved styling of <h3>. [OFB]
* Fixed indentation bug in ul/ol, removed some redundant styling. [OFB]
* Fixed validation errors in tests. [OFB]
* Changed IE stylesheet condition comment to include all versions of IE. [OFB]
* Started on a new approach for the PNG plugin. Will not be included in this release. [OFB]
* Fixed incorrect rendering of ol in IE6/7. [OFB]
* Created a new, spiffier sample page. [OFB]
-Version 0.5 - 28/8/2007
+Version 0.5 - August 28, 2007
--
* Changed grid width from 14 to 24 columns [OFB]
* Removed 'first' CSS class and the need to apply it to the first column in a row of columns. [OFB]
* Reverted to using pixels instead of em units to specify vertical spacing due to baseline issues with
all browsers except Firefox. [OFB]
* New set of default fonts. (Experimental) [OFB]
* Added test files [OFB]
-Version 0.4 - 11/8/2007
+Version 0.4 - August 11, 2007
--
* All font sizes and vertical margins are now elastic, through the use of em units.
Resizing works great in every tested browser. [OFB]
* Comes with a new, compressed version of BP, which reduces the size of the core files by 60 percent. [OFB]
* Support for incremental leading, contributed by Mark Boulton. [OFB]
* Adds perfected CSS buttons, by Kevin Hale of Particletree fame. [OFB]
* Fixes all known IE bugs. [OFB]
* Loads of minor fixes and additions. [OFB]
-Version 0.3 - 3/8/2007
+Version 0.3 - March 8, 2007
--
* Initial release of Blueprint (versions 0.1 and 0.2 were internal only).
diff --git a/public/blueprint/LICENSE b/public/blueprint/LICENSE
index d747410..b3d7647 100755
--- a/public/blueprint/LICENSE
+++ b/public/blueprint/LICENSE
@@ -1,314 +1,314 @@
Blueprint CSS Framework License
----------------------------------------------------------------
-Copyright (c) 2007-2008 Olav Bjorkoy (olav at bjorkoy.com)
+Copyright (c) 2007-2008 blueprintcss.org
The Blueprint CSS Framework is available for use in all personal or
commercial projects, under both the (modified) MIT and the GPL license. You
may choose the one that fits your project.
The (modified) MIT License
----------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sub-license, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice, and every other copyright notice found in this
software, and all the attributions in every file, and this permission notice
shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
The GPL License
----------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
\ No newline at end of file
diff --git a/public/blueprint/README.textile b/public/blueprint/README.textile
index 9fe1feb..cf2b2d7 100755
--- a/public/blueprint/README.textile
+++ b/public/blueprint/README.textile
@@ -1,81 +1,83 @@
h1. Blueprint CSS Framework Readme
Welcome to Blueprint! This is a CSS framework designed to cut down on your CSS development time. It gives you a solid foundation to build your own CSS on. Here are some of the features BP provides out-of-the-box:
* An easily customizable grid
* Sensible default typography
* A typographic baseline
* Perfected browser CSS reset
* A stylesheet for printing
* Powerful scripts for customization
* Absolutely no bloat!
h2. Project Info
-* *Web*: "http://github.com/joshuaclayton/blueprint-css":http://github.com/joshuaclayton/blueprint-css
+* *Web*: "http://blueprintcss.org":http://blueprintcss.org
+* *Source*: "http://github.com/joshuaclayton/blueprint-css":http://github.com/joshuaclayton/blueprint-css
+* *Wiki*: "http://github.com/joshuaclayton/blueprint-css/wikis/home":http://github.com/joshuaclayton/blueprint-css/wikis/home
* *Bug/Feature Tracking*: "http://blueprintcss.lighthouseapp.com":http://blueprintcss.lighthouseapp.com
h2. Setup Instructions
Here's how you set up Blueprint on your site.
# Upload the "blueprint" folder in this folder to your server, and place it in whatever folder you'd like. A good choice would be your CSS folder.
# Add the following three lines to every @<head/>@ of your site. Make sure the three @href@ paths are correct (here, BP is in my CSS folder): <pre>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if IE]>
<link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]-->
</pre>
Remember to include trailing slashes (" />") in these lines if you're using XHTML.
# For development, add the .showgrid class to any container or column to see the underlying grid. Check out the @plugins@ directory for more advanced functionality.
h2. Tutorials
* "Tutorial on BlueFlavor":http://blueflavor.com/blog/design/blueprintcss_101.php
* "How to customize BP with the compressor script":http://jdclayton.com/blueprints_compress_a_walkthrough.html
-* "How to use a grid in a layout":http://subtraction.com/archives/2007/0318_oh_yeeaahh.php
+* "How to use a grid in a layout":http://subtraction.com/2007/03/18/oh-yeeaahh
* "How to use a baseline in your typography":http://alistapart.com/articles/settingtypeontheweb
h2. Files in Blueprint
The framework has a few files you should check out. Every file in the @src@ directory contains lots of (hopefully) clarifying comments.
Compressed files (these go in the HTML):
* @blueprint/screen.css@
* @blueprint/print.css@
* @blueprint/ie.css@
Source files:
* @blueprint/src/reset.css@<br/>
This file resets CSS values that browsers tend to set for you.
* @blueprint/src/grid.css@<br/>
This file sets up the grid (it's true). It has a lot of classes you apply to @<div/>@ elements to set up any sort of column-based grid.
* @blueprint/src/typography.css@<br/>
This file sets some default typography. It also has a few methods for some really fancy stuff to do with your text.
* @blueprint/src/forms.css@<br/>
Includes some minimal styling of forms.
* @blueprint/src/print.css@<br/>
This file sets some default print rules, so that printed versions of your site looks better than they usually would. It should be included on every page.
* @blueprint/src/ie.css@<br/>
Includes every hack for our beloved IE6 and 7.
Scripts:
* @lib/compress.rb@<br/>
A Ruby script for compressing and customizing your CSS. Set a custom namespace, column count, widths, output paths, multiple projects, and semantic class names. See commenting in @compress.rb@ or run @$ruby compress.rb -h@ for more information.
* @lib/validate.rb@<br/>
Validates the Blueprint core files with the W3C CSS validator.
Other:
* @blueprint/plugins/@<br/>
Contains additional functionality in the form of simple plugins for Blueprint. See individual readme files in the directory of each plugin for further instructions.
* @tests/@<br/>
Contains html files which tests most aspects of Blueprint. Open @tests/index.html@ for further instructions.
h2. Extra Information
* For credits and origins, see AUTHORS.
* For license instructions, see LICENSE.
-* For the latest updates, see CHANGELOG.
\ No newline at end of file
+* For the latest updates, see CHANGELOG.
diff --git a/public/blueprint/TUTORIAL.textile b/public/blueprint/TUTORIAL.textile
index 40e0f29..debf595 100755
--- a/public/blueprint/TUTORIAL.textile
+++ b/public/blueprint/TUTORIAL.textile
@@ -1,206 +1,206 @@
h1. Blueprint CSS Framework Tutorial
Welcome to this tutorial on Blueprint. It will give you a thorough intro to what you can do with the framework, and a few notes on what you shouldn't do with it. Let's get started.
h2. About Blueprint
Blueprint is a CSS framework, designed to cut down on your development time. It gives you a solid foundation to build your CSS on top of, including some sensible default typography, a customizable grid, a print stylesheet and much more.
However, BP is not a silver bullet, and it's best suited for websites where each page may require it's own design. Take a look at existing BP pages before deciding if the framework is right for you. You may also check out the test files in the @tests@ directory, which demonstrates most of the features in Blueprint.
The word "framework" may be a bit misleading in this context, since BP does not make suggestions on how you should organize or write your CSS. It's more like a "css toolbox" with helpful bits and pieces, from which you may pick and choose based on your needs.
h2. Structural Overview
From the bottom up, here are the CSS layers in Blueprint:
# *CSS reset*: Removes any default CSS rules set by each browser.
# *Typography*: Gives you some nice default typography and colors.
# *Grid*: Provides a set of CSS classes for making grid layouts.
The second part of Blueprint are the scripts, which lets you customize most
aspects of the framework, from column count and widths, to output paths and
CSS class namespaces. We have two scripts:
# *Compressor*: For compressing and customizing the source files.
# *Validator*: For validating the Blueprint core files.
That's the quick overview, so now we can finally get into the details. First, we'll take
a look at the CSS in Blueprint. We'll then move on to the scripts, where I'll show you
how to customize the framework.
h2. Setting Up Blueprint
To use Blueprint, you must include three files in your HTML:
* @blueprint/screen.css@: All CSS for screen, projection viewing.
* @blueprint/print.css@: A basic stylesheet for printing.
* @blueprint/ie.css@: A few needed corrections for Internet Explorer
To include them, use the following HTML (make sure the href paths are correct):
<pre>
<link rel="stylesheet" href="css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="css/blueprint/print.css" type="text/css" media="print">
<!--[if IE]>
<link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]-->
</pre>
Remember to add trailing slashes if you're using XHTML (" />").
h2. Using the CSS in Blueprint
As mentioned before, there's basically three layers of CSS in Blueprint. The first two layers, the browser CSS reset and the default typography, apply themselves by changing CSS of standard HTML elements. In other words, you don't need to change anything in these files. If you for instance want to change the font size, do this in your own stylesheet, so that it's easy to upgrade Blueprint when new versions arrive.
h3. Classes for Typography
While the typography of Blueprint mainly applies itself, there's a few classes
provided. Here's a list of their names and what they do:
<dl>
<dt>@.small@</dt><dd>Makes the text of this element smaller.</dd>
<dt>@.large@</dt><dd>Makes the text of this element larger.</dd>
<dt>@.hide@</dt><dd>Hides an element.</dd>
<dt>@.quiet@</dt><dd>Tones down the font color for this element.</dd>
<dt>@.loud@</dt><dd>Makes this elements text black.</dd>
<dt>@.highlight@</dt><dd>Adds a yellow background to the text.</dd>
<dt>@.added@</dt><dd>Adds green background to the text.</dd>
<dt>@.removed@</dt><dd>Adds red background to the text.</dd>
<dt>@.first@</dt><dd>Removes any left sided margin/padding from the element.</dd>
<dt>@.last@</dt><dd>Removes any right sided margin/padding from the element.</dd>
<dt>@.top@</dt><dd>Removes any top margin/padding from the element.</dd>
<dt>@.bottom@</dt><dd>Removes any bottom margin/padding from the element.</dd>
</dl>
h3. Styling Forms
To make Blueprint style your input elements, each text input element should
have the class @.text@, or @.title@, where @.text@ is the normal size,
and @.title@ gives you an input field with larger text.
There's also a few classes you may use for success and error messages:
<dl>
<dt>@div.error@</dt><dd>Creates an error box (red).</dd>
<dt>@div.notice@</dt><dd>Creates a box for notices (yellow).</dd>
<dt>@div.success@</dt><dd>Creates a box for success messages (green).</dd>
</dl>
h3. Creating a Grid
The third layer is the grid CSS classes, which is the tool Blueprint gives you to create almost any kind of grid layout for your site. Keep in mind that most of the CSS behind the grid can be customized (explained below). In this section however, I'm using the default settings.
The default grid is made up of 24 columns, each spanning 30px, with a 10px margin between each column. The total width comes to 950px, which is a good width for 1024x768 resolution displays. If you're interested in a narrower design, see the section on customizing the grid, below.
So how do you set up a grid? By using classes provided by Blueprint. To create a column, make a new @<div/>@, and apply one of the @.span-x@ classes to it. For instance, if you want a 3-column setup, with two narrow and one wide column, a header and a footer here's how you do it:
<pre>
<div class="container">
<div class="span-24">
The header
</div>
<div class="span-4">
The first column
</div>
<div class="span-16">
The center column
</div>
<div class="span-4 last">
The last column
</div>
<div class="span-24">
The footer
- </div
+ </div>
</div>
</pre>
In addition to the spans, there are two important classes you need to know about. First of all, every Blueprint site needs to be wrapped in a div with the class @.container@, which is usually placed right after the body tag.
Second, the last column in a row (which by default has 24 columns), needs the class @.last@ to remove its left hand margin. Note, however, that each @.span-24@ don't need the @.last@ class, since these always span the entire width of the page.
To create basic grids, this is all you need to know. The grid CSS however, provides many more classes for more intricate designs. To see some of them in action, check out the files in @tests/parts/@. These files demonstrate what's possible with the grid in Blueprint.
Here's a quick overview of the other classes you can use in to make your grid:
<dl>
<dt>@.append-x@</dt><dd>Appends x number of empty columns after a column.</dd>
<dt>@.prepend-x@</dt><dd>Preppends x number of empty columns before a column.</dd>
<dt>@.push-x@</dt><dd>Pushes a column x columns to the left. Can be used to swap columns.</dd>
<dt>@.pull-x@</dt><dd>Pulls a column x columns to the right. Can be used to swap columns.</dd>
<dt>@.border@</dt><dd>Applies a border to the right side of the column.</dd>
<dt>@.colborder@</dt><dd>Appends one empty column, with a border down the middle.</dd>
<dt>@.clear@</dt><dd>Makes a column drop below a row, regardless of space.</dd>
<dt>@.showgrid@</dt><dd>Add to container or column to see the grid and baseline.</dd>
</dl>
In this list, @x@ is a number from 1 through 23 for append/prepend and 1 through 24 for push/pull. These numbers will of course change if you set a new number of columns in the settings file.
Here's another example where we have four columns of equal width, with a border between the two first and the two last columns, as well as a four column gap in the middle:
<pre>
<div class="container">
<div class="span-5 border">
The first column
</div>
<div class="span-5 append-4">
The second column
</div>
<div class="span-5 border">
The third column
</div>
<div class="span-5 last">
The fourth (last) column
</div>
</div>
</pre>
You may also nest columns to achieve the desired layout. Here's a setup where we want four rectangles with two on top and two below on the first half of the page, and one single column spanning the second half of the page:
<pre>
<div class="container">
<div class="span-12">
<div class="span-6">
Top left
</div>
<div class="span-6 last">
Top right
</div>
<div class="span-6">
Bottom left
</div>
<div class="span-6 last">
Bottom right
</div>
</div>
<div class="span-12 last">
Second half of page
</div>
</div>
</pre>
Try this code in your browser it it's difficult to understand what it would look like. To see more examples on how to use these classes, check out @/tests/parts/grid.html@.
h2. The Scripts
Blueprint comes with two scripts: one for compressing and customizing the CSS, and one for validating the core CSS files, which is handy if you're making changes to these files.
h3. The Validator
The validator has a fairly simple job - validate the CSS in the core BP files. The script uses a bundled version of the W3C CSS validator to accomplish this. To run it, you'll need to have Ruby installed on your machine. You can then run the script like so: @$ ruby validate.rb@.
Note that there are a few validation errors shipping with Blueprint. These are known, and comes from a few CSS hacks needed to ensure consistent rendering across the vast browser field.
h3. The Compressor
As the files you'll include in your HTML are the compressed versions of the core CSS files, you'll have to recompress the core if you've made any changes. This is what the compressor script is for.
In addition this is where you customize the grid. To customize the grid, a special settings file is used, and the new CSS is generated once you run the compressor. The new compressed files will then reflect your settings file.
To recompress, you just have to run the script. This will parse the core CSS files and output new compressed files in the blueprint folder. As with the validator, Ruby has to be installed to use this script. In the @lib@ directory, run: @$ruby compress.rb@
Calling this file by itself will pull files from @blueprint/src@ and concatenate them into three files; @ie.css@, @print.css@, and @screen.css@. However, argument variables can be set to change how this works. Calling @$ruby compress.rb -h@ will reveal basic arguments you can pass to the script.
h3. Custom Settings
To learn how to use custom settings, read through the documentation within @lib/compress.rb@
\ No newline at end of file
diff --git a/public/blueprint/blueprint/ie.css b/public/blueprint/blueprint/ie.css
index bb59a79..ae5bcb5 100755
--- a/public/blueprint/blueprint/ie.css
+++ b/public/blueprint/blueprint/ie.css
@@ -1,22 +1,27 @@
/* -----------------------------------------------------------------------
- Blueprint CSS Framework 0.7.1
- http://blueprintcss.googlecode.com
- * Copyright (c) 2007-2008. See LICENSE for more info.
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* ie.css */
body {text-align:center;}
.container {text-align:left;}
-* html .column {overflow-x:hidden;}
-* html legend {margin:-18px -8px 16px 0;padding:0;}
+* html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {overflow-x:hidden;}
+* html legend {margin:0px -8px 16px 0;padding:0;}
ol {margin-left:2em;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
html>body p code {*white-space:normal;}
-hr {margin:-8px auto 11px;}
\ No newline at end of file
+hr {margin:-8px auto 11px;}
+img {-ms-interpolation-mode:bicubic;}
+.clearfix, .container {display:inline-block;}
+* html .clearfix, * html .container {height:1%;}
+fieldset {padding-top:0;}
\ No newline at end of file
diff --git a/public/blueprint/blueprint/plugins/buttons/icons/cross.png b/public/blueprint/blueprint/plugins/buttons/icons/cross.png
new file mode 100755
index 0000000..1514d51
Binary files /dev/null and b/public/blueprint/blueprint/plugins/buttons/icons/cross.png differ
diff --git a/public/blueprint/blueprint/plugins/buttons/icons/key.png b/public/blueprint/blueprint/plugins/buttons/icons/key.png
new file mode 100755
index 0000000..a9d5e4f
Binary files /dev/null and b/public/blueprint/blueprint/plugins/buttons/icons/key.png differ
diff --git a/public/blueprint/blueprint/plugins/buttons/icons/tick.png b/public/blueprint/blueprint/plugins/buttons/icons/tick.png
new file mode 100755
index 0000000..a9925a0
Binary files /dev/null and b/public/blueprint/blueprint/plugins/buttons/icons/tick.png differ
diff --git a/public/blueprint/blueprint/plugins/buttons/readme.txt b/public/blueprint/blueprint/plugins/buttons/readme.txt
new file mode 100755
index 0000000..a8c2b57
--- /dev/null
+++ b/public/blueprint/blueprint/plugins/buttons/readme.txt
@@ -0,0 +1,32 @@
+Buttons
+
+* Gives you great looking CSS buttons, for both <a> and <button>.
+* Demo: particletree.com/features/rediscovering-the-button-element
+
+
+Credits
+----------------------------------------------------------------
+
+* Created by Kevin Hale [particletree.com]
+* Adapted for Blueprint by Olav Bjorkoy [bjorkoy.com]
+
+
+Usage
+----------------------------------------------------------------
+
+1) Add this plugin to lib/settings.yml.
+ See compress.rb for instructions.
+
+2) Use the following HTML code to place the buttons on your site:
+
+ <button type="submit" class="button positive">
+ <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
+ </button>
+
+ <a class="button" href="/password/reset/">
+ <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
+ </a>
+
+ <a href="#" class="button negative">
+ <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
+ </a>
diff --git a/public/blueprint/blueprint/plugins/buttons/screen.css b/public/blueprint/blueprint/plugins/buttons/screen.css
new file mode 100755
index 0000000..bb66b21
--- /dev/null
+++ b/public/blueprint/blueprint/plugins/buttons/screen.css
@@ -0,0 +1,97 @@
+/* --------------------------------------------------------------
+
+ buttons.css
+ * Gives you some great CSS-only buttons.
+
+ Created by Kevin Hale [particletree.com]
+ * particletree.com/features/rediscovering-the-button-element
+
+ See Readme.txt in this folder for instructions.
+
+-------------------------------------------------------------- */
+
+a.button, button {
+ display:block;
+ float:left;
+ margin: 0.7em 0.5em 0.7em 0;
+ padding:5px 10px 5px 7px; /* Links */
+
+ border:1px solid #dedede;
+ border-top:1px solid #eee;
+ border-left:1px solid #eee;
+
+ background-color:#f5f5f5;
+ font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
+ font-size:100%;
+ line-height:130%;
+ text-decoration:none;
+ font-weight:bold;
+ color:#565656;
+ cursor:pointer;
+}
+button {
+ width:auto;
+ overflow:visible;
+ padding:4px 10px 3px 7px; /* IE6 */
+}
+button[type] {
+ padding:4px 10px 4px 7px; /* Firefox */
+ line-height:17px; /* Safari */
+}
+*:first-child+html button[type] {
+ padding:4px 10px 3px 7px; /* IE7 */
+}
+button img, a.button img{
+ margin:0 3px -3px 0 !important;
+ padding:0;
+ border:none;
+ width:16px;
+ height:16px;
+ float:none;
+}
+
+
+/* Button colors
+-------------------------------------------------------------- */
+
+/* Standard */
+button:hover, a.button:hover{
+ background-color:#dff4ff;
+ border:1px solid #c2e1ef;
+ color:#336699;
+}
+a.button:active{
+ background-color:#6299c5;
+ border:1px solid #6299c5;
+ color:#fff;
+}
+
+/* Positive */
+body .positive {
+ color:#529214;
+}
+a.positive:hover, button.positive:hover {
+ background-color:#E6EFC2;
+ border:1px solid #C6D880;
+ color:#529214;
+}
+a.positive:active {
+ background-color:#529214;
+ border:1px solid #529214;
+ color:#fff;
+}
+
+/* Negative */
+body .negative {
+ color:#d12f19;
+}
+a.negative:hover, button.negative:hover {
+ background-color:#fbe3e4;
+ border:1px solid #fbc2c4;
+ color:#d12f19;
+}
+a.negative:active {
+ background-color:#d12f19;
+ border:1px solid #d12f19;
+ color:#fff;
+}
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/doc.png b/public/blueprint/blueprint/plugins/link-icons/icons/doc.png
new file mode 100755
index 0000000..834cdfa
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/doc.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/email.png b/public/blueprint/blueprint/plugins/link-icons/icons/email.png
new file mode 100755
index 0000000..7348aed
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/email.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/external.png b/public/blueprint/blueprint/plugins/link-icons/icons/external.png
new file mode 100755
index 0000000..cf1cfb4
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/external.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/feed.png b/public/blueprint/blueprint/plugins/link-icons/icons/feed.png
new file mode 100755
index 0000000..315c4f4
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/feed.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/im.png b/public/blueprint/blueprint/plugins/link-icons/icons/im.png
new file mode 100755
index 0000000..79f35cc
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/im.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/pdf.png b/public/blueprint/blueprint/plugins/link-icons/icons/pdf.png
new file mode 100755
index 0000000..8f8095e
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/pdf.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/visited.png b/public/blueprint/blueprint/plugins/link-icons/icons/visited.png
new file mode 100755
index 0000000..ebf206d
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/visited.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/icons/xls.png b/public/blueprint/blueprint/plugins/link-icons/icons/xls.png
new file mode 100755
index 0000000..b977d7e
Binary files /dev/null and b/public/blueprint/blueprint/plugins/link-icons/icons/xls.png differ
diff --git a/public/blueprint/blueprint/plugins/link-icons/readme.txt b/public/blueprint/blueprint/plugins/link-icons/readme.txt
new file mode 100755
index 0000000..3cb1b2c
--- /dev/null
+++ b/public/blueprint/blueprint/plugins/link-icons/readme.txt
@@ -0,0 +1,18 @@
+Link Icons
+* Icons for links based on protocol or file type.
+
+This is not supported in IE versions < 7.
+
+
+Credits
+----------------------------------------------------------------
+
+* Marc Morgan
+* Olav Bjorkoy [bjorkoy.com]
+
+
+Usage
+----------------------------------------------------------------
+
+1) Add this line to your HTML:
+ <link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">
\ No newline at end of file
diff --git a/public/blueprint/blueprint/plugins/link-icons/screen.css b/public/blueprint/blueprint/plugins/link-icons/screen.css
new file mode 100755
index 0000000..6d3d47f
--- /dev/null
+++ b/public/blueprint/blueprint/plugins/link-icons/screen.css
@@ -0,0 +1,40 @@
+/* --------------------------------------------------------------
+
+ link-icons.css
+ * Icons for links based on protocol or file type.
+
+ See the Readme file in this folder for additional instructions.
+
+-------------------------------------------------------------- */
+
+/* Use this class if a link gets an icon when it shouldn't. */
+body a.noicon {
+ background:transparent none !important;
+ padding:0 !important;
+ margin:0 !important;
+}
+
+/* Make sure the icons are not cut */
+a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
+a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
+a[href$=".rdf"], a[href^="aim:"] {
+ padding:2px 22px 2px 0;
+ margin:-2px 0;
+ background-repeat: no-repeat;
+ background-position: right center;
+}
+
+/* External links */
+a[href^="http:"] { background-image: url(icons/external.png); }
+a[href^="mailto:"] { background-image: url(icons/email.png); }
+a[href^="http:"]:visited { background-image: url(icons/visited.png); }
+
+/* Files */
+a[href$=".pdf"] { background-image: url(icons/pdf.png); }
+a[href$=".doc"] { background-image: url(icons/doc.png); }
+a[href$=".xls"] { background-image: url(icons/xls.png); }
+
+/* Misc */
+a[href$=".rss"],
+a[href$=".rdf"] { background-image: url(icons/feed.png); }
+a[href^="aim:"] { background-image: url(icons/im.png); }
\ No newline at end of file
diff --git a/public/blueprint/blueprint/plugins/rtl/readme.txt b/public/blueprint/blueprint/plugins/rtl/readme.txt
new file mode 100755
index 0000000..4c46535
--- /dev/null
+++ b/public/blueprint/blueprint/plugins/rtl/readme.txt
@@ -0,0 +1,10 @@
+RTL
+* Mirrors Blueprint, so it can be used with Right-to-Left languages.
+
+By Ran Yaniv Hartstein, ranh.co.il
+
+Usage
+----------------------------------------------------------------
+
+1) Add this line to your HTML:
+ <link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection">
\ No newline at end of file
diff --git a/public/blueprint/blueprint/plugins/rtl/screen.css b/public/blueprint/blueprint/plugins/rtl/screen.css
new file mode 100755
index 0000000..0304477
--- /dev/null
+++ b/public/blueprint/blueprint/plugins/rtl/screen.css
@@ -0,0 +1,109 @@
+/* --------------------------------------------------------------
+
+ rtl.css
+ * Mirrors Blueprint for left-to-right languages
+
+ By Ran Yaniv Hartstein [ranh.co.il]
+
+-------------------------------------------------------------- */
+
+body .container { direction: rtl; }
+body .column {
+ float: right;
+ margin-right: 0;
+ margin-left: 10px;
+}
+
+body div.last { margin-left: 0; }
+body table .last { padding-left: 0; }
+
+body .append-1 { padding-right: 0; padding-left: 40px; }
+body .append-2 { padding-right: 0; padding-left: 80px; }
+body .append-3 { padding-right: 0; padding-left: 120px; }
+body .append-4 { padding-right: 0; padding-left: 160px; }
+body .append-5 { padding-right: 0; padding-left: 200px; }
+body .append-6 { padding-right: 0; padding-left: 240px; }
+body .append-7 { padding-right: 0; padding-left: 280px; }
+body .append-8 { padding-right: 0; padding-left: 320px; }
+body .append-9 { padding-right: 0; padding-left: 360px; }
+body .append-10 { padding-right: 0; padding-left: 400px; }
+body .append-11 { padding-right: 0; padding-left: 440px; }
+body .append-12 { padding-right: 0; padding-left: 480px; }
+body .append-13 { padding-right: 0; padding-left: 520px; }
+body .append-14 { padding-right: 0; padding-left: 560px; }
+body .append-15 { padding-right: 0; padding-left: 600px; }
+body .append-16 { padding-right: 0; padding-left: 640px; }
+body .append-17 { padding-right: 0; padding-left: 680px; }
+body .append-18 { padding-right: 0; padding-left: 720px; }
+body .append-19 { padding-right: 0; padding-left: 760px; }
+body .append-20 { padding-right: 0; padding-left: 800px; }
+body .append-21 { padding-right: 0; padding-left: 840px; }
+body .append-22 { padding-right: 0; padding-left: 880px; }
+body .append-23 { padding-right: 0; padding-left: 920px; }
+
+body .prepend-1 { padding-left: 0; padding-right: 40px; }
+body .prepend-2 { padding-left: 0; padding-right: 80px; }
+body .prepend-3 { padding-left: 0; padding-right: 120px; }
+body .prepend-4 { padding-left: 0; padding-right: 160px; }
+body .prepend-5 { padding-left: 0; padding-right: 200px; }
+body .prepend-6 { padding-left: 0; padding-right: 240px; }
+body .prepend-7 { padding-left: 0; padding-right: 280px; }
+body .prepend-8 { padding-left: 0; padding-right: 320px; }
+body .prepend-9 { padding-left: 0; padding-right: 360px; }
+body .prepend-10 { padding-left: 0; padding-right: 400px; }
+body .prepend-11 { padding-left: 0; padding-right: 440px; }
+body .prepend-12 { padding-left: 0; padding-right: 480px; }
+body .prepend-13 { padding-left: 0; padding-right: 520px; }
+body .prepend-14 { padding-left: 0; padding-right: 560px; }
+body .prepend-15 { padding-left: 0; padding-right: 600px; }
+body .prepend-16 { padding-left: 0; padding-right: 640px; }
+body .prepend-17 { padding-left: 0; padding-right: 680px; }
+body .prepend-18 { padding-left: 0; padding-right: 720px; }
+body .prepend-19 { padding-left: 0; padding-right: 760px; }
+body .prepend-20 { padding-left: 0; padding-right: 800px; }
+body .prepend-21 { padding-left: 0; padding-right: 840px; }
+body .prepend-22 { padding-left: 0; padding-right: 880px; }
+body .prepend-23 { padding-left: 0; padding-right: 920px; }
+
+body .border {
+ padding-right: 0;
+ padding-left: 4px;
+ margin-right: 0;
+ margin-left: 5px;
+ border-right: none;
+ border-left: 1px solid #eee;
+}
+
+body .colborder {
+ padding-right: 0;
+ padding-left: 24px;
+ margin-right: 0;
+ margin-left: 25px;
+ border-right: none;
+ border-left: 1px solid #eee;
+}
+
+body .pull-1 { margin-left: 0; margin-right: -40px; }
+body .pull-2 { margin-left: 0; margin-right: -80px; }
+body .pull-3 { margin-left: 0; margin-right: -120px; }
+body .pull-4 { margin-left: 0; margin-right: -160px; }
+
+body .push-0 { margin: 0 18px 0 0; }
+body .push-1 { margin: 0 18px 0 -40px; }
+body .push-2 { margin: 0 18px 0 -80px; }
+body .push-3 { margin: 0 18px 0 -120px; }
+body .push-4 { margin: 0 18px 0 -160px; }
+body .push-0, body .push-1, body .push-2,
+body .push-3, body .push-4 { float: left; }
+
+
+/* Typography with RTL support */
+body h1,body h2,body h3,
+body h4,body h5,body h6 { font-family: Arial, sans-serif; }
+html body { font-family: Arial, sans-serif; }
+body pre,body code,body tt { font-family: monospace; }
+
+/* Mirror floats and margins on typographic elements */
+body p img { float: right; margin: 1.5em 0 1.5em 1.5em; }
+body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;}
+body td, body th { text-align:right; }
\ No newline at end of file
diff --git a/public/blueprint/blueprint/print.css b/public/blueprint/blueprint/print.css
index 6618614..e4a7973 100755
--- a/public/blueprint/blueprint/print.css
+++ b/public/blueprint/blueprint/print.css
@@ -1,29 +1,30 @@
/* -----------------------------------------------------------------------
- Blueprint CSS Framework 0.7.1
- http://blueprintcss.googlecode.com
- * Copyright (c) 2007-2008. See LICENSE for more info.
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* print.css */
-body {line-height:1.5;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;color:#000;background:none;font-size:10pt;}
+body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
.container {background:none;}
hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
hr.space {background:#fff;color:#fff;}
h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
code {font:.9em "Courier New", Monaco, Courier, monospace;}
img {float:left;margin:1.5em 1.5em 1.5em 0;}
a img {border:none;}
p img.top {margin-top:0;}
blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
.small {font-size:.9em;}
.large {font-size:1.1em;}
.quiet {color:#999;}
.hide {display:none;}
a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
-a:link:after, a:visited:after {content:" (" attr(href) ") ";font-size:90%;}
\ No newline at end of file
+a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}
\ No newline at end of file
diff --git a/public/blueprint/blueprint/screen.css b/public/blueprint/blueprint/screen.css
index d4dd897..26b5acb 100755
--- a/public/blueprint/blueprint/screen.css
+++ b/public/blueprint/blueprint/screen.css
@@ -1,226 +1,252 @@
/* -----------------------------------------------------------------------
- Blueprint CSS Framework 0.7.1
- http://blueprintcss.googlecode.com
- * Copyright (c) 2007-2008. See LICENSE for more info.
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
+
+ * Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */
/* reset.css */
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
body {line-height:1.5;}
table {border-collapse:separate;border-spacing:0;}
caption, th, td {text-align:left;font-weight:normal;}
table, td, th {vertical-align:middle;}
blockquote:before, blockquote:after, q:before, q:after {content:"";}
blockquote, q {quotes:"" "";}
a img {border:none;}
/* typography.css */
-body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;}
+body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
h2 {font-size:2em;margin-bottom:0.75em;}
h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
-h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;height:1.25em;}
+h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
h6 {font-size:1em;font-weight:bold;}
h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
p {margin:0 0 1.5em;}
-p img {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
+p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
a:focus, a:hover {color:#000;}
a {color:#009;text-decoration:underline;}
blockquote {margin:1.5em;color:#666;font-style:italic;}
strong {font-weight:bold;}
em, dfn {font-style:italic;}
dfn {font-weight:bold;}
sup, sub {line-height:0;}
abbr, acronym {border-bottom:1px dotted #666;}
address {margin:0 0 1.5em;font-style:italic;}
del {color:#666;}
-pre, code {margin:1.5em 0;white-space:pre;}
+pre {margin:1.5em 0;white-space:pre;}
pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
li ul, li ol {margin:0 1.5em;}
ul, ol {margin:0 1.5em 1.5em 1.5em;}
ul {list-style-type:disc;}
ol {list-style-type:decimal;}
dl {margin:0 0 1.5em 0;}
dl dt {font-weight:bold;}
dd {margin-left:1.5em;}
table {margin-bottom:1.4em;width:100%;}
-th {font-weight:bold;background:#C3D9FF;}
-th, td {padding:4px 10px 4px 5px;}
-tr.even td {background:#E5ECF9;}
+th {font-weight:bold;}
+thead th {background:#c3d9ff;}
+th, td, caption {padding:4px 10px 4px 5px;}
+tr.even td {background:#e5ecf9;}
tfoot {font-style:italic;}
caption {background:#eee;}
.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
.hide {display:none;}
.quiet {color:#666;}
.loud {color:#000;}
.highlight {background:#ff0;}
.added {background:#060;color:#fff;}
.removed {background:#900;color:#fff;}
.first {margin-left:0;padding-left:0;}
.last {margin-right:0;padding-right:0;}
.top {margin-top:0;padding-top:0;}
.bottom {margin-bottom:0;padding-bottom:0;}
+/* forms.css */
+label {font-weight:bold;}
+fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
+legend {font-weight:bold;font-size:1.2em;}
+input.text, input.title, textarea, select {margin:0.5em 0;border:1px solid #bbb;}
+input.text:focus, input.title:focus, textarea:focus, select:focus {border:1px solid #666;}
+input.text, input.title {width:300px;padding:5px;}
+input.title {font-size:1.5em;}
+textarea {width:390px;height:250px;padding:5px;}
+.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
+.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
+.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
+.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
+.error a {color:#8a1f11;}
+.notice a {color:#514721;}
+.success a {color:#264409;}
+
/* grid.css */
.container {width:950px;margin:0 auto;}
.showgrid {background:url(src/grid.png);}
-body {margin:1.5em 0;}
-div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
-div.last {margin-right:0;}
+.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
+.last, div.last {margin-right:0;}
.span-1 {width:30px;}
.span-2 {width:70px;}
.span-3 {width:110px;}
.span-4 {width:150px;}
.span-5 {width:190px;}
.span-6 {width:230px;}
.span-7 {width:270px;}
.span-8 {width:310px;}
.span-9 {width:350px;}
.span-10 {width:390px;}
.span-11 {width:430px;}
.span-12 {width:470px;}
.span-13 {width:510px;}
.span-14 {width:550px;}
.span-15 {width:590px;}
.span-16 {width:630px;}
.span-17 {width:670px;}
.span-18 {width:710px;}
.span-19 {width:750px;}
.span-20 {width:790px;}
.span-21 {width:830px;}
.span-22 {width:870px;}
.span-23 {width:910px;}
.span-24, div.span-24 {width:950px;margin:0;}
+input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {border-left-width:1px!important;border-right-width:1px!important;padding-left:5px!important;padding-right:5px!important;}
+input.span-1, textarea.span-1 {width:18px!important;}
+input.span-2, textarea.span-2 {width:58px!important;}
+input.span-3, textarea.span-3 {width:98px!important;}
+input.span-4, textarea.span-4 {width:138px!important;}
+input.span-5, textarea.span-5 {width:178px!important;}
+input.span-6, textarea.span-6 {width:218px!important;}
+input.span-7, textarea.span-7 {width:258px!important;}
+input.span-8, textarea.span-8 {width:298px!important;}
+input.span-9, textarea.span-9 {width:338px!important;}
+input.span-10, textarea.span-10 {width:378px!important;}
+input.span-11, textarea.span-11 {width:418px!important;}
+input.span-12, textarea.span-12 {width:458px!important;}
+input.span-13, textarea.span-13 {width:498px!important;}
+input.span-14, textarea.span-14 {width:538px!important;}
+input.span-15, textarea.span-15 {width:578px!important;}
+input.span-16, textarea.span-16 {width:618px!important;}
+input.span-17, textarea.span-17 {width:658px!important;}
+input.span-18, textarea.span-18 {width:698px!important;}
+input.span-19, textarea.span-19 {width:738px!important;}
+input.span-20, textarea.span-20 {width:778px!important;}
+input.span-21, textarea.span-21 {width:818px!important;}
+input.span-22, textarea.span-22 {width:858px!important;}
+input.span-23, textarea.span-23 {width:898px!important;}
+input.span-24, textarea.span-24 {width:938px!important;}
.append-1 {padding-right:40px;}
.append-2 {padding-right:80px;}
.append-3 {padding-right:120px;}
.append-4 {padding-right:160px;}
.append-5 {padding-right:200px;}
.append-6 {padding-right:240px;}
.append-7 {padding-right:280px;}
.append-8 {padding-right:320px;}
.append-9 {padding-right:360px;}
.append-10 {padding-right:400px;}
.append-11 {padding-right:440px;}
.append-12 {padding-right:480px;}
.append-13 {padding-right:520px;}
.append-14 {padding-right:560px;}
.append-15 {padding-right:600px;}
.append-16 {padding-right:640px;}
.append-17 {padding-right:680px;}
.append-18 {padding-right:720px;}
.append-19 {padding-right:760px;}
.append-20 {padding-right:800px;}
.append-21 {padding-right:840px;}
.append-22 {padding-right:880px;}
.append-23 {padding-right:920px;}
.prepend-1 {padding-left:40px;}
.prepend-2 {padding-left:80px;}
.prepend-3 {padding-left:120px;}
.prepend-4 {padding-left:160px;}
.prepend-5 {padding-left:200px;}
.prepend-6 {padding-left:240px;}
.prepend-7 {padding-left:280px;}
.prepend-8 {padding-left:320px;}
.prepend-9 {padding-left:360px;}
.prepend-10 {padding-left:400px;}
.prepend-11 {padding-left:440px;}
.prepend-12 {padding-left:480px;}
.prepend-13 {padding-left:520px;}
.prepend-14 {padding-left:560px;}
.prepend-15 {padding-left:600px;}
.prepend-16 {padding-left:640px;}
.prepend-17 {padding-left:680px;}
.prepend-18 {padding-left:720px;}
.prepend-19 {padding-left:760px;}
.prepend-20 {padding-left:800px;}
.prepend-21 {padding-left:840px;}
.prepend-22 {padding-left:880px;}
.prepend-23 {padding-left:920px;}
div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
.pull-1 {margin-left:-40px;}
.pull-2 {margin-left:-80px;}
.pull-3 {margin-left:-120px;}
.pull-4 {margin-left:-160px;}
.pull-5 {margin-left:-200px;}
.pull-6 {margin-left:-240px;}
.pull-7 {margin-left:-280px;}
.pull-8 {margin-left:-320px;}
.pull-9 {margin-left:-360px;}
.pull-10 {margin-left:-400px;}
.pull-11 {margin-left:-440px;}
.pull-12 {margin-left:-480px;}
.pull-13 {margin-left:-520px;}
.pull-14 {margin-left:-560px;}
.pull-15 {margin-left:-600px;}
.pull-16 {margin-left:-640px;}
.pull-17 {margin-left:-680px;}
.pull-18 {margin-left:-720px;}
.pull-19 {margin-left:-760px;}
.pull-20 {margin-left:-800px;}
.pull-21 {margin-left:-840px;}
.pull-22 {margin-left:-880px;}
.pull-23 {margin-left:-920px;}
.pull-24 {margin-left:-960px;}
.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
.push-1 {margin:0 -40px 1.5em 40px;}
.push-2 {margin:0 -80px 1.5em 80px;}
.push-3 {margin:0 -120px 1.5em 120px;}
.push-4 {margin:0 -160px 1.5em 160px;}
.push-5 {margin:0 -200px 1.5em 200px;}
.push-6 {margin:0 -240px 1.5em 240px;}
.push-7 {margin:0 -280px 1.5em 280px;}
.push-8 {margin:0 -320px 1.5em 320px;}
.push-9 {margin:0 -360px 1.5em 360px;}
.push-10 {margin:0 -400px 1.5em 400px;}
.push-11 {margin:0 -440px 1.5em 440px;}
.push-12 {margin:0 -480px 1.5em 480px;}
.push-13 {margin:0 -520px 1.5em 520px;}
.push-14 {margin:0 -560px 1.5em 560px;}
.push-15 {margin:0 -600px 1.5em 600px;}
.push-16 {margin:0 -640px 1.5em 640px;}
.push-17 {margin:0 -680px 1.5em 680px;}
.push-18 {margin:0 -720px 1.5em 720px;}
.push-19 {margin:0 -760px 1.5em 760px;}
.push-20 {margin:0 -800px 1.5em 800px;}
.push-21 {margin:0 -840px 1.5em 840px;}
.push-22 {margin:0 -880px 1.5em 880px;}
.push-23 {margin:0 -920px 1.5em 920px;}
.push-24 {margin:0 -960px 1.5em 960px;}
.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
+.prepend-top {margin-top:1.5em;}
+.append-bottom {margin-bottom:1.5em;}
.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
hr.space {background:#fff;color:#fff;}
-.clearfix:after, .container:after {content:".";display:block;height:0;clear:both;visibility:hidden;}
-.clearfix, .container {display:inline-block;}
-* html .clearfix, * html .container {height:1%;}
+.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
.clearfix, .container {display:block;}
-.clear {clear:both;}
-
-/* forms.css */
-label {font-weight:bold;}
-fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
-legend {font-weight:bold;font-size:1.2em;}
-input.text, input.title, textarea, select {margin:0.5em 0;border:1px solid #bbb;}
-input.text:focus, input.title:focus, textarea:focus, select:focus {border:1px solid #666;}
-input.text, input.title {width:300px;padding:5px;}
-input.title {font-size:1.5em;}
-textarea {width:390px;height:250px;padding:5px;}
-.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
-.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
-.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
-.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
-.error a {color:#8a1f11;}
-.notice a {color:#514721;}
-.success a {color:#264409;}
\ No newline at end of file
+.clear {clear:both;}
\ No newline at end of file
diff --git a/public/blueprint/blueprint/src/grid.css b/public/blueprint/blueprint/src/grid.css
index df5619c..0575af4 100755
--- a/public/blueprint/blueprint/src/grid.css
+++ b/public/blueprint/blueprint/src/grid.css
@@ -1,212 +1,269 @@
-/* --------------------------------------------------------------
-
- grid.css
- * Sets up an easy-to-use grid of 24 columns.
-
- By default, the grid is 950px wide, with 24 columns
- spanning 30px, and a 10px margin between columns.
-
- If you need fewer or more columns, namespaces or semantic
- element names, use the compressor script (lib/compress.rb)
-
- Note: Changes made in this file will not be applied when
- using the compressor: make changes in lib/blueprint/grid.css.rb
-
--------------------------------------------------------------- */
-
-/* A container should group all your columns. */
-.container {
- width: 950px;
- margin: 0 auto;
-}
-
-/* Use this class on any div.span / container to see the grid. */
-.showgrid { background: url(src/grid.png); }
-
-/* Body margin for a sensible default look. */
-body { margin:1.5em 0; }
-
-
-/* Columns
--------------------------------------------------------------- */
-
-/* Sets up basic grid floating and margin. */
-div.span-1, div.span-2, div.span-3, div.span-4, div.span-5,
-div.span-6, div.span-7, div.span-8, div.span-9, div.span-10,
-div.span-11, div.span-12, div.span-13, div.span-14, div.span-15,
-div.span-16, div.span-17, div.span-18, div.span-19, div.span-20,
-div.span-21, div.span-22, div.span-23, div.span-24 {
- float: left;
- margin-right: 10px;
-}
-
-/* The last column in a row needs this class. */
-div.last { margin-right: 0; }
-
-/* Use these classes to set the width of a column. */
-.span-1 { width: 30px; }
-.span-2 { width: 70px; }
-.span-3 { width: 110px; }
-.span-4 { width: 150px; }
-.span-5 { width: 190px; }
-.span-6 { width: 230px; }
-.span-7 { width: 270px; }
-.span-8 { width: 310px; }
-.span-9 { width: 350px; }
-.span-10 { width: 390px; }
-.span-11 { width: 430px; }
-.span-12 { width: 470px; }
-.span-13 { width: 510px; }
-.span-14 { width: 550px; }
-.span-15 { width: 590px; }
-.span-16 { width: 630px; }
-.span-17 { width: 670px; }
-.span-18 { width: 710px; }
-.span-19 { width: 750px; }
-.span-20 { width: 790px; }
-.span-21 { width: 830px; }
-.span-22 { width: 870px; }
-.span-23 { width: 910px; }
-.span-24, div.span-24 { width: 950px; margin: 0; }
-
-/* Add these to a column to append empty cols. */
-.append-1 { padding-right: 40px; }
-.append-2 { padding-right: 80px; }
-.append-3 { padding-right: 120px; }
-.append-4 { padding-right: 160px; }
-.append-5 { padding-right: 200px; }
-.append-6 { padding-right: 240px; }
-.append-7 { padding-right: 280px; }
-.append-8 { padding-right: 320px; }
-.append-9 { padding-right: 360px; }
-.append-10 { padding-right: 400px; }
-.append-11 { padding-right: 440px; }
-.append-12 { padding-right: 480px; }
-.append-13 { padding-right: 520px; }
-.append-14 { padding-right: 560px; }
-.append-15 { padding-right: 600px; }
-.append-16 { padding-right: 640px; }
-.append-17 { padding-right: 680px; }
-.append-18 { padding-right: 720px; }
-.append-19 { padding-right: 760px; }
-.append-20 { padding-right: 800px; }
-.append-21 { padding-right: 840px; }
-.append-22 { padding-right: 880px; }
-.append-23 { padding-right: 920px; }
-
-/* Add these to a column to prepend empty cols. */
-.prepend-1 { padding-left: 40px; }
-.prepend-2 { padding-left: 80px; }
-.prepend-3 { padding-left: 120px; }
-.prepend-4 { padding-left: 160px; }
-.prepend-5 { padding-left: 200px; }
-.prepend-6 { padding-left: 240px; }
-.prepend-7 { padding-left: 280px; }
-.prepend-8 { padding-left: 320px; }
-.prepend-9 { padding-left: 360px; }
-.prepend-10 { padding-left: 400px; }
-.prepend-11 { padding-left: 440px; }
-.prepend-12 { padding-left: 480px; }
-.prepend-13 { padding-left: 520px; }
-.prepend-14 { padding-left: 560px; }
-.prepend-15 { padding-left: 600px; }
-.prepend-16 { padding-left: 640px; }
-.prepend-17 { padding-left: 680px; }
-.prepend-18 { padding-left: 720px; }
-.prepend-19 { padding-left: 760px; }
-.prepend-20 { padding-left: 800px; }
-.prepend-21 { padding-left: 840px; }
-.prepend-22 { padding-left: 880px; }
-.prepend-23 { padding-left: 920px; }
-
-
-/* Border on right hand side of a column. */
-div.border {
- padding-right: 4px;
- margin-right: 5px;
- border-right: 1px solid #eee;
-}
-
-/* Border with more whitespace, spans one column. */
-div.colborder {
- padding-right: 24px;
- margin-right: 25px;
- border-right: 1px solid #eee;
-}
-
-
-/* Use these classes on an element to push it into the
- next column, or to pull it into the previous column. */
-
-.pull-1 { margin-left: -40px; }
-.pull-2 { margin-left: -80px; }
-.pull-3 { margin-left: -120px; }
-.pull-4 { margin-left: -160px; }
-.pull-5 { margin-left: -200px; }
-
-.pull-1, .pull-2, .pull-3,
-.pull-4, .pull-5, .pull-5 {
- float:left;
- position:relative;
-}
-
-.push-1 { margin: 0 -40px 1.5em 40px; }
-.push-2 { margin: 0 -80px 1.5em 80px; }
-.push-3 { margin: 0 -120px 1.5em 120px; }
-.push-4 { margin: 0 -160px 1.5em 160px; }
-.push-5 { margin: 0 -200px 1.5em 200px; }
-
-.push-0, .push-1, .push-2,
-.push-3, .push-4, .push-5 {
- float: right;
- position:relative;
-}
-
-
-/* Misc classes and elements
--------------------------------------------------------------- */
-
-/* Use a .box to create a padded box inside a column. */
-.box {
- padding: 1.5em;
- margin-bottom: 1.5em;
- background: #E5ECF9;
-}
-
-/* Use this to create a horizontal ruler across a column. */
-hr {
- background: #ddd;
- color: #ddd;
- clear: both;
- float: none;
- width: 100%;
- height: .1em;
- margin: 0 0 1.45em;
- border: none;
-}
-hr.space {
- background: #fff;
- color: #fff;
-}
-
-
-/* Clearing floats without extra markup
- Based on How To Clear Floats Without Structural Markup by PiE
- [http://www.positioniseverything.net/easyclearing.html] */
-
-.clearfix:after, .container:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
-}
-.clearfix, .container {display: inline-block;}
-* html .clearfix,
-* html .container {height: 1%;}
-.clearfix, .container {display: block;}
-
-/* Regular clearing
- apply to column that should drop below previous ones. */
-
-.clear { clear:both; }
+/* --------------------------------------------------------------
+ grid.css - mirror version of src/grid.css
+-------------------------------------------------------------- */
+
+/* A container should group all your columns. */
+.container {
+ width: 950px;
+ margin: 0 auto;
+}
+
+/* Use this class on any div.span / container to see the grid. */
+.showgrid {
+ background: url(src/grid.png);
+}
+
+
+/* Columns
+-------------------------------------------------------------- */
+
+/* Sets up basic grid floating and margin. */
+.column, div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {
+ float: left;
+ margin-right: 10px;
+}
+
+/* The last column in a row needs this class. */
+.last, div.last { margin-right: 0; }
+
+/* Use these classes to set the width of a column. */
+.span-1 {width: 30px;}
+
+.span-2 {width: 70px;}
+.span-3 {width: 110px;}
+.span-4 {width: 150px;}
+.span-5 {width: 190px;}
+.span-6 {width: 230px;}
+.span-7 {width: 270px;}
+.span-8 {width: 310px;}
+.span-9 {width: 350px;}
+.span-10 {width: 390px;}
+.span-11 {width: 430px;}
+.span-12 {width: 470px;}
+.span-13 {width: 510px;}
+.span-14 {width: 550px;}
+.span-15 {width: 590px;}
+.span-16 {width: 630px;}
+.span-17 {width: 670px;}
+.span-18 {width: 710px;}
+.span-19 {width: 750px;}
+.span-20 {width: 790px;}
+.span-21 {width: 830px;}
+.span-22 {width: 870px;}
+.span-23 {width: 910px;}
+.span-24, div.span-24 { width:950px; margin:0; }
+
+/* Use these classes to set the width of an input. */
+input.span-1, textarea.span-1, input.span-2, textarea.span-2, input.span-3, textarea.span-3, input.span-4, textarea.span-4, input.span-5, textarea.span-5, input.span-6, textarea.span-6, input.span-7, textarea.span-7, input.span-8, textarea.span-8, input.span-9, textarea.span-9, input.span-10, textarea.span-10, input.span-11, textarea.span-11, input.span-12, textarea.span-12, input.span-13, textarea.span-13, input.span-14, textarea.span-14, input.span-15, textarea.span-15, input.span-16, textarea.span-16, input.span-17, textarea.span-17, input.span-18, textarea.span-18, input.span-19, textarea.span-19, input.span-20, textarea.span-20, input.span-21, textarea.span-21, input.span-22, textarea.span-22, input.span-23, textarea.span-23, input.span-24, textarea.span-24 {
+ border-left-width: 1px!important;
+ border-right-width: 1px!important;
+ padding-left: 5px!important;
+ padding-right: 5px!important;
+}
+
+input.span-1, textarea.span-1 { width: 18px!important; }
+input.span-2, textarea.span-2 { width: 58px!important; }
+input.span-3, textarea.span-3 { width: 98px!important; }
+input.span-4, textarea.span-4 { width: 138px!important; }
+input.span-5, textarea.span-5 { width: 178px!important; }
+input.span-6, textarea.span-6 { width: 218px!important; }
+input.span-7, textarea.span-7 { width: 258px!important; }
+input.span-8, textarea.span-8 { width: 298px!important; }
+input.span-9, textarea.span-9 { width: 338px!important; }
+input.span-10, textarea.span-10 { width: 378px!important; }
+input.span-11, textarea.span-11 { width: 418px!important; }
+input.span-12, textarea.span-12 { width: 458px!important; }
+input.span-13, textarea.span-13 { width: 498px!important; }
+input.span-14, textarea.span-14 { width: 538px!important; }
+input.span-15, textarea.span-15 { width: 578px!important; }
+input.span-16, textarea.span-16 { width: 618px!important; }
+input.span-17, textarea.span-17 { width: 658px!important; }
+input.span-18, textarea.span-18 { width: 698px!important; }
+input.span-19, textarea.span-19 { width: 738px!important; }
+input.span-20, textarea.span-20 { width: 778px!important; }
+input.span-21, textarea.span-21 { width: 818px!important; }
+input.span-22, textarea.span-22 { width: 858px!important; }
+input.span-23, textarea.span-23 { width: 898px!important; }
+input.span-24, textarea.span-24 { width: 938px!important; }
+
+/* Add these to a column to append empty cols. */
+
+.append-1 { padding-right: 40px;}
+.append-2 { padding-right: 80px;}
+.append-3 { padding-right: 120px;}
+.append-4 { padding-right: 160px;}
+.append-5 { padding-right: 200px;}
+.append-6 { padding-right: 240px;}
+.append-7 { padding-right: 280px;}
+.append-8 { padding-right: 320px;}
+.append-9 { padding-right: 360px;}
+.append-10 { padding-right: 400px;}
+.append-11 { padding-right: 440px;}
+.append-12 { padding-right: 480px;}
+.append-13 { padding-right: 520px;}
+.append-14 { padding-right: 560px;}
+.append-15 { padding-right: 600px;}
+.append-16 { padding-right: 640px;}
+.append-17 { padding-right: 680px;}
+.append-18 { padding-right: 720px;}
+.append-19 { padding-right: 760px;}
+.append-20 { padding-right: 800px;}
+.append-21 { padding-right: 840px;}
+.append-22 { padding-right: 880px;}
+.append-23 { padding-right: 920px;}
+
+/* Add these to a column to prepend empty cols. */
+
+.prepend-1 { padding-left: 40px;}
+.prepend-2 { padding-left: 80px;}
+.prepend-3 { padding-left: 120px;}
+.prepend-4 { padding-left: 160px;}
+.prepend-5 { padding-left: 200px;}
+.prepend-6 { padding-left: 240px;}
+.prepend-7 { padding-left: 280px;}
+.prepend-8 { padding-left: 320px;}
+.prepend-9 { padding-left: 360px;}
+.prepend-10 { padding-left: 400px;}
+.prepend-11 { padding-left: 440px;}
+.prepend-12 { padding-left: 480px;}
+.prepend-13 { padding-left: 520px;}
+.prepend-14 { padding-left: 560px;}
+.prepend-15 { padding-left: 600px;}
+.prepend-16 { padding-left: 640px;}
+.prepend-17 { padding-left: 680px;}
+.prepend-18 { padding-left: 720px;}
+.prepend-19 { padding-left: 760px;}
+.prepend-20 { padding-left: 800px;}
+.prepend-21 { padding-left: 840px;}
+.prepend-22 { padding-left: 880px;}
+.prepend-23 { padding-left: 920px;}
+
+
+/* Border on right hand side of a column. */
+div.border {
+ padding-right: 4px;
+ margin-right: 5px;
+ border-right: 1px solid #eee;
+}
+
+/* Border with more whitespace, spans one column. */
+div.colborder {
+ padding-right: 24px;
+ margin-right: 25px;
+ border-right: 1px solid #eee;
+}
+
+
+/* Use these classes on an element to push it into the
+next column, or to pull it into the previous column. */
+
+
+.pull-1 { margin-left: -40px; }
+.pull-2 { margin-left: -80px; }
+.pull-3 { margin-left: -120px; }
+.pull-4 { margin-left: -160px; }
+.pull-5 { margin-left: -200px; }
+.pull-6 { margin-left: -240px; }
+.pull-7 { margin-left: -280px; }
+.pull-8 { margin-left: -320px; }
+.pull-9 { margin-left: -360px; }
+.pull-10 { margin-left: -400px; }
+.pull-11 { margin-left: -440px; }
+.pull-12 { margin-left: -480px; }
+.pull-13 { margin-left: -520px; }
+.pull-14 { margin-left: -560px; }
+.pull-15 { margin-left: -600px; }
+.pull-16 { margin-left: -640px; }
+.pull-17 { margin-left: -680px; }
+.pull-18 { margin-left: -720px; }
+.pull-19 { margin-left: -760px; }
+.pull-20 { margin-left: -800px; }
+.pull-21 { margin-left: -840px; }
+.pull-22 { margin-left: -880px; }
+.pull-23 { margin-left: -920px; }
+.pull-24 { margin-left: -960px; }
+
+.pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float: left; position:relative;}
+
+
+.push-1 { margin: 0 -40px 1.5em 40px; }
+.push-2 { margin: 0 -80px 1.5em 80px; }
+.push-3 { margin: 0 -120px 1.5em 120px; }
+.push-4 { margin: 0 -160px 1.5em 160px; }
+.push-5 { margin: 0 -200px 1.5em 200px; }
+.push-6 { margin: 0 -240px 1.5em 240px; }
+.push-7 { margin: 0 -280px 1.5em 280px; }
+.push-8 { margin: 0 -320px 1.5em 320px; }
+.push-9 { margin: 0 -360px 1.5em 360px; }
+.push-10 { margin: 0 -400px 1.5em 400px; }
+.push-11 { margin: 0 -440px 1.5em 440px; }
+.push-12 { margin: 0 -480px 1.5em 480px; }
+.push-13 { margin: 0 -520px 1.5em 520px; }
+.push-14 { margin: 0 -560px 1.5em 560px; }
+.push-15 { margin: 0 -600px 1.5em 600px; }
+.push-16 { margin: 0 -640px 1.5em 640px; }
+.push-17 { margin: 0 -680px 1.5em 680px; }
+.push-18 { margin: 0 -720px 1.5em 720px; }
+.push-19 { margin: 0 -760px 1.5em 760px; }
+.push-20 { margin: 0 -800px 1.5em 800px; }
+.push-21 { margin: 0 -840px 1.5em 840px; }
+.push-22 { margin: 0 -880px 1.5em 880px; }
+.push-23 { margin: 0 -920px 1.5em 920px; }
+.push-24 { margin: 0 -960px 1.5em 960px; }
+
+.push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float: right; position:relative;}
+
+
+/* Misc classes and elements
+-------------------------------------------------------------- */
+
+/* In case you need to add a gutter above/below an element */
+.prepend-top {
+ margin-top:1.5em;
+}
+.append-bottom {
+ margin-bottom:1.5em;
+}
+
+/* Use a .box to create a padded box inside a column. */
+.box {
+ padding: 1.5em;
+ margin-bottom: 1.5em;
+ background: #E5ECF9;
+}
+
+/* Use this to create a horizontal ruler across a column. */
+hr {
+ background: #ddd;
+ color: #ddd;
+ clear: both;
+ float: none;
+ width: 100%;
+ height: .1em;
+ margin: 0 0 1.45em;
+ border: none;
+}
+hr.space {
+ background: #fff;
+ color: #fff;
+}
+
+
+/* Clearing floats without extra markup
+ Based on How To Clear Floats Without Structural Markup by PiE
+ [http://www.positioniseverything.net/easyclearing.html] */
+
+.clearfix:after, .container:after {
+ content: "\0020";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ overflow:hidden;
+}
+.clearfix, .container {display: block;}
+
+/* Regular clearing
+ apply to column that should drop below previous ones. */
+
+.clear { clear:both; }
diff --git a/public/blueprint/blueprint/src/grid.png b/public/blueprint/blueprint/src/grid.png
index 129d4a2..885d981 100755
Binary files a/public/blueprint/blueprint/src/grid.png and b/public/blueprint/blueprint/src/grid.png differ
diff --git a/public/blueprint/blueprint/src/ie.css b/public/blueprint/blueprint/src/ie.css
index fed798d..b09be9a 100755
--- a/public/blueprint/blueprint/src/ie.css
+++ b/public/blueprint/blueprint/src/ie.css
@@ -1,35 +1,61 @@
/* --------------------------------------------------------------
ie.css
Contains every hack for Internet Explorer,
so that our core files stay sweet and nimble.
-------------------------------------------------------------- */
/* Make sure the layout is centered in IE5 */
body { text-align: center; }
.container { text-align: left; }
/* Fixes IE margin bugs */
-* html .column { overflow-x: hidden; }
+* html .column, * html div.span-1, * html div.span-2,
+* html div.span-3, * html div.span-4, * html div.span-5,
+* html div.span-6, * html div.span-7, * html div.span-8,
+* html div.span-9, * html div.span-10, * html div.span-11,
+* html div.span-12, * html div.span-13, * html div.span-14,
+* html div.span-15, * html div.span-16, * html div.span-17,
+* html div.span-18, * html div.span-19, * html div.span-20,
+* html div.span-21, * html div.span-22, * html div.span-23,
+* html div.span-24 { overflow-x: hidden; }
/* Elements
-------------------------------------------------------------- */
/* Fixes incorrect styling of legend in IE6. */
-* html legend { margin:-18px -8px 16px 0; padding:0; }
+* html legend { margin:0px -8px 16px 0; padding:0; }
/* Fixes incorrect placement of ol numbers in IE6/7. */
ol { margin-left:2em; }
/* Fixes wrong line-height on sup/sub in IE. */
sup { vertical-align: text-top; }
sub { vertical-align: text-bottom; }
/* Fixes IE7 missing wrapping of code elements. */
html>body p code { *white-space: normal; }
/* IE 6&7 has problems with setting proper <hr> margins. */
hr { margin: -8px auto 11px; }
+
+/* Explicitly set interpolation, allowing dynamically resized images to not look horrible */
+img { -ms-interpolation-mode: bicubic; }
+
+/* Clearing
+-------------------------------------------------------------- */
+
+/* Makes clearfix actually work in IE */
+.clearfix, .container {display: inline-block;}
+* html .clearfix,
+* html .container {height: 1%;}
+
+
+/* Forms
+-------------------------------------------------------------- */
+
+/* Fixes padding on fieldset */
+fieldset {padding-top: 0;}
\ No newline at end of file
diff --git a/public/blueprint/blueprint/src/print.css b/public/blueprint/blueprint/src/print.css
index 719e40c..37aba91 100755
--- a/public/blueprint/blueprint/src/print.css
+++ b/public/blueprint/blueprint/src/print.css
@@ -1,85 +1,85 @@
/* --------------------------------------------------------------
print.css
* Gives you some sensible styles for printing pages.
* See Readme file in this directory for further instructions.
Some additions you'll want to make, customized to your markup:
#header, #footer, #navigation { display:none; }
-------------------------------------------------------------- */
body {
line-height: 1.5;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
color:#000;
background: none;
font-size: 10pt;
}
/* Layout
-------------------------------------------------------------- */
.container {
background: none;
}
hr {
background:#ccc;
color:#ccc;
width:100%;
height:2px;
margin:2em 0;
padding:0;
border:none;
}
hr.space {
background: #fff;
color: #fff;
}
/* Text
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; }
code { font:.9em "Courier New", Monaco, Courier, monospace; }
img { float:left; margin:1.5em 1.5em 1.5em 0; }
a img { border:none; }
p img.top { margin-top: 0; }
blockquote {
margin:1.5em;
padding:1em;
font-style:italic;
font-size:.9em;
}
.small { font-size: .9em; }
.large { font-size: 1.1em; }
.quiet { color: #999; }
.hide { display:none; }
/* Links
-------------------------------------------------------------- */
a:link, a:visited {
background: transparent;
font-weight:700;
text-decoration: underline;
}
a:link:after, a:visited:after {
- content: " (" attr(href) ") ";
+ content: " (" attr(href) ")";
font-size: 90%;
}
/* If you're having trouble printing relative links, uncomment and customize this:
(note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */
/* a[href^="/"]:after {
content: " (http://www.yourdomain.com" attr(href) ") ";
} */
diff --git a/public/blueprint/blueprint/src/typography.css b/public/blueprint/blueprint/src/typography.css
index a686e78..5dfa208 100755
--- a/public/blueprint/blueprint/src/typography.css
+++ b/public/blueprint/blueprint/src/typography.css
@@ -1,104 +1,105 @@
/* --------------------------------------------------------------
typography.css
* Sets up some sensible default typography.
-
+
-------------------------------------------------------------- */
/* Default font settings.
The font-size percentage is of 16px. (0.75 * 16px = 12px) */
body {
font-size: 75%;
color: #222;
background: #fff;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}
/* Headings
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #111; }
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
h2 { font-size: 2em; margin-bottom: 0.75em; }
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
-h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; height: 1.25em; }
+h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
h6 { font-size: 1em; font-weight: bold; }
h1 img, h2 img, h3 img,
h4 img, h5 img, h6 img {
margin: 0;
}
/* Text elements
-------------------------------------------------------------- */
p { margin: 0 0 1.5em; }
-p img { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
+p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }
a:focus,
a:hover { color: #000; }
a { color: #009; text-decoration: underline; }
blockquote { margin: 1.5em; color: #666; font-style: italic; }
strong { font-weight: bold; }
em,dfn { font-style: italic; }
dfn { font-weight: bold; }
sup, sub { line-height: 0; }
abbr,
acronym { border-bottom: 1px dotted #666; }
address { margin: 0 0 1.5em; font-style: italic; }
del { color:#666; }
-pre,code { margin: 1.5em 0; white-space: pre; }
-pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
+pre { margin: 1.5em 0; white-space: pre; }
+pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
/* Lists
-------------------------------------------------------------- */
li ul,
li ol { margin:0 1.5em; }
ul, ol { margin: 0 1.5em 1.5em 1.5em; }
ul { list-style-type: disc; }
ol { list-style-type: decimal; }
dl { margin: 0 0 1.5em 0; }
dl dt { font-weight: bold; }
dd { margin-left: 1.5em;}
/* Tables
-------------------------------------------------------------- */
table { margin-bottom: 1.4em; width:100%; }
-th { font-weight: bold; background: #C3D9FF; }
-th,td { padding: 4px 10px 4px 5px; }
-tr.even td { background: #E5ECF9; }
+th { font-weight: bold; }
+thead th { background: #c3d9ff; }
+th,td,caption { padding: 4px 10px 4px 5px; }
+tr.even td { background: #e5ecf9; }
tfoot { font-style: italic; }
caption { background: #eee; }
/* Misc classes
-------------------------------------------------------------- */
.small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
.large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
.hide { display: none; }
.quiet { color: #666; }
.loud { color: #000; }
.highlight { background:#ff0; }
.added { background:#060; color: #fff; }
.removed { background:#900; color: #fff; }
.first { margin-left:0; padding-left:0; }
.last { margin-right:0; padding-right:0; }
.top { margin-top:0; padding-top:0; }
.bottom { margin-bottom:0; padding-bottom:0; }
diff --git a/public/blueprint/lib/blueprint/blueprint.rb b/public/blueprint/lib/blueprint/blueprint.rb
index 42e01cd..3c57f36 100755
--- a/public/blueprint/lib/blueprint/blueprint.rb
+++ b/public/blueprint/lib/blueprint/blueprint.rb
@@ -1,36 +1,39 @@
require 'fileutils'
module Blueprint
# path to the root Blueprint directory
ROOT_PATH = File.join(File.expand_path(File.dirname(__FILE__)), "../../")
# path to where the Blueprint CSS files are stored
BLUEPRINT_ROOT_PATH = File.join(Blueprint::ROOT_PATH, 'blueprint')
# path to where the Blueprint CSS raw CSS files are stored
SOURCE_PATH = File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'src')
# path to where the Blueprint CSS generated test files are stored
TEST_PATH = File.join(Blueprint::ROOT_PATH, 'tests')
# path to the root of the Blueprint scripts
LIB_PATH = File.join(Blueprint::ROOT_PATH, 'lib', 'blueprint')
# path to where Blueprint plugins are stored
PLUGINS_PATH = File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'plugins')
# settings YAML file where custom user settings are saved
SETTINGS_FILE = File.join(Blueprint::ROOT_PATH, 'lib', 'settings.yml')
# path to validator jar file to validate generated CSS files
VALIDATOR_FILE = File.join(Blueprint::LIB_PATH, 'validate', 'css-validator.jar')
# hash of compressed and source CSS files
CSS_FILES = {
- 'screen.css' => ['reset.css', 'typography.css', 'grid.css', 'forms.css'],
+ 'screen.css' => ['reset.css', 'typography.css', 'forms.css', 'grid.css'],
'print.css' => ['print.css'],
'ie.css' => ['ie.css']
}
# default number of columns for Blueprint layout
COLUMN_COUNT = 24
# default column width (in pixels) for Blueprint layout
COLUMN_WIDTH = 30
# default gutter width (in pixels) for Blueprint layout
GUTTER_WIDTH = 10
+
+ INPUT_PADDING = 5
+ INPUT_BORDER = 1
end
Dir["#{File.join(Blueprint::LIB_PATH)}/*"].each do |file|
require "#{file}" if file =~ /\.rb$/ && file !~ /blueprint.rb/
end
\ No newline at end of file
diff --git a/public/blueprint/lib/blueprint/compressor.rb b/public/blueprint/lib/blueprint/compressor.rb
index 26d8507..d02f07a 100755
--- a/public/blueprint/lib/blueprint/compressor.rb
+++ b/public/blueprint/lib/blueprint/compressor.rb
@@ -1,259 +1,261 @@
require 'yaml'
require 'optparse'
module Blueprint
class Compressor
TEST_FILES = ['index.html',
'parts/elements.html',
'parts/forms.html',
'parts/grid.html',
'parts/sample.html']
attr_accessor :namespace, :custom_css, :custom_layout, :semantic_classes, :project_name, :plugins
attr_reader :custom_path, :loaded_from_settings, :destination_path, :script_name
# overridden setter method for destination_path
# also sets custom_path flag on Blueprint::Compressor instance
def destination_path=(path)
@destination_path = path
@custom_path = @destination_path != Blueprint::BLUEPRINT_ROOT_PATH
end
# constructor
def initialize
# set up defaults
@script_name = File.basename($0)
@loaded_from_settings = false
self.namespace = ""
self.destination_path = Blueprint::BLUEPRINT_ROOT_PATH
self.custom_layout = CustomLayout.new
self.project_name = nil
self.custom_css = {}
self.semantic_classes = {}
self.plugins = []
self.options.parse!(ARGV)
initialize_project_from_yaml(self.project_name)
end
# generates output CSS based on any args passed in
# overwrites any existing CSS, as well as grid.png and tests
def generate!
output_header # information to the user (in the console) describing custom settings
generate_css_files # loops through Blueprint::CSS_FILES to generate output CSS
generate_tests # updates HTML with custom namespaces in order to test the generated library. TODO: have tests kick out to custom location
output_footer # informs the user that the CSS generation process is complete
end
def options #:nodoc:#
OptionParser.new do |o|
o.set_summary_indent(' ')
o.banner = "Usage: #{@script_name} [options]"
o.define_head "Blueprint Compressor"
o.separator ""
o.separator "options"
o.on( "-oOUTPUT_PATH", "--output_path=OUTPUT_PATH", String,
"Define a different path to output generated CSS files to.") { |path| self.destination_path = path }
o.on( "-nBP_NAMESPACE", "--namespace=BP_NAMESPACE", String,
"Define a namespace prepended to all Blueprint classes (e.g. .your-ns-span-24)") { |ns| self.namespace = ns }
o.on( "-pPROJECT_NAME", "--project=PROJECT_NAME", String,
"If using the settings.yml file, PROJECT_NAME is the project name you want to export") {|project| @project_name = project }
o.on( "--column_width=COLUMN_WIDTH", Integer,
"Set a new column width (in pixels) for the output grid") {|cw| self.custom_layout.column_width = cw }
o.on( "--gutter_width=GUTTER_WIDTH", Integer,
"Set a new gutter width (in pixels) for the output grid") {|gw| self.custom_layout.gutter_width = gw }
o.on( "--column_count=COLUMN_COUNT", Integer,
"Set a new column count for the output grid") {|cc| self.custom_layout.column_count = cc }
#o.on("-v", "--verbose", "Turn on verbose output.") { |$verbose| }
o.on("-h", "--help", "Show this help message.") { puts o; exit }
end
end
private
# attempts to load output settings from settings.yml
def initialize_project_from_yaml(project_name = nil)
# ensures project_name is set and settings.yml is present
return unless (project_name && File.exist?(Blueprint::SETTINGS_FILE))
# loads yaml into hash
projects = YAML::load(File.path_to_string(Blueprint::SETTINGS_FILE))
if (project = projects[project_name]) # checks to see if project info is present
self.namespace = project['namespace'] || ""
self.destination_path = (self.destination_path == Blueprint::BLUEPRINT_ROOT_PATH ? project['path'] : self.destination_path) || Blueprint::BLUEPRINT_ROOT_PATH
self.custom_css = project['custom_css'] || {}
self.semantic_classes = project['semantic_classes'] || {}
self.plugins = project['plugins'] || []
if (layout = project['custom_layout'])
- self.custom_layout = CustomLayout.new(:column_count => layout['column_count'], :column_width => layout['column_width'], :gutter_width => layout['gutter_width'])
+ self.custom_layout = CustomLayout.new(:column_count => layout['column_count'], :column_width => layout['column_width'], :gutter_width => layout['gutter_width'], :input_padding => layout['input_padding'], :input_border => layout['input_border'])
end
@loaded_from_settings = true
end
end
def generate_css_files
Blueprint::CSS_FILES.each do |output_file_name, css_source_file_names|
css_output_path = File.join(destination_path, output_file_name)
puts "\n Assembling to #{custom_path ? css_output_path : "default blueprint path"}"
# CSS file generation
css_output = css_file_header # header included on all three Blueprint-generated files
css_output += "\n\n"
# Iterate through src/ .css files and compile to individual core compressed file
css_source_file_names.each do |css_source_file|
puts " + src/#{css_source_file}"
css_output += "/* #{css_source_file} */\n" if css_source_file_names.any?
source_options = if self.custom_layout && css_source_file == 'grid.css'
self.custom_layout.generate_grid_css
else
File.path_to_string File.join(Blueprint::SOURCE_PATH, css_source_file)
end
css_output += Blueprint::CSSParser.new(source_options, :namespace => namespace).to_s
css_output += "\n"
end
# append CSS from custom files
css_output = append_custom_css(css_output, output_file_name)
#append CSS from plugins
css_output = append_plugin_css(css_output, output_file_name)
#save CSS to correct path, stripping out any extra whitespace at the end of the file
File.string_to_file(css_output.rstrip, css_output_path)
end
# append semantic class names if set
append_semantic_classes
#attempt to generate a grid.png file
if (grid_builder = GridBuilder.new(:column_width => self.custom_layout.column_width, :gutter_width => self.custom_layout.gutter_width, :output_path => File.join(self.destination_path, 'src')))
grid_builder.generate!
end
end
def append_custom_css(css, current_file_name)
# check to see if a custom (non-default) location was used for output files
# if custom path is used, handle custom CSS, if any
- return css unless self.custom_path
+ return css unless self.custom_path and self.custom_css[current_file_name]
- overwrite_path = File.join(destination_path, (self.custom_css[current_file_name] || "my-#{current_file_name}"))
- overwrite_css = File.exists?(overwrite_path) ? File.path_to_string(overwrite_path) : ""
+ self.custom_css[current_file_name].each do |custom_css|
+ overwrite_path = File.join(destination_path, (custom_css || "my-#{current_file_name}"))
+ overwrite_css = File.exists?(overwrite_path) ? File.path_to_string(overwrite_path) : ""
- # if there's CSS present, add it to the CSS output
- unless overwrite_css.blank?
- puts " + custom styles\n"
- css += "/* #{overwrite_path} */\n"
- css += CSSParser.new(overwrite_css).to_s + "\n"
+ # if there's CSS present, add it to the CSS output
+ unless overwrite_css.blank?
+ puts " + custom styles (#{custom_css})\n"
+ css += "/* #{overwrite_path} */\n"
+ css += CSSParser.new(overwrite_css).to_s + "\n"
+ end
end
css
end
def append_plugin_css(css, current_file_name)
return css unless self.plugins.any?
plugin_css = ""
self.plugins.each do |plugin|
plugin_file_specific = File.join(Blueprint::PLUGINS_PATH, plugin, current_file_name)
plugin_file_generic = File.join(Blueprint::PLUGINS_PATH, plugin, "#{plugin}.css")
file = if File.exists?(plugin_file_specific)
plugin_file_specific
elsif File.exists?(plugin_file_generic) && current_file_name =~ /^screen|print/
plugin_file_generic
end
if file
puts " + #{plugin} plugin\n"
plugin_css += "/* #{plugin} */\n"
plugin_css += CSSParser.new(File.path_to_string(file)).to_s + "\n"
Dir.glob(File.join(File.dirname(file), "**", "**")).each do |cp|
short_path = cp.gsub(/#{File.dirname(file)}./ , '')
# make directory if it doesn't exist
directory = File.dirname(short_path)
FileUtils.mkdir_p(File.join(destination_path, directory)) unless directory == "."
FileUtils.cp cp, File.join(destination_path, short_path) unless File.directory?(File.join(File.dirname(file), short_path)) || cp == file
end
end
end
css += plugin_css
end
def append_semantic_classes
screen_output_path = File.join(self.destination_path, "screen.css")
semantic_styles = SemanticClassNames.new(:namespace => self.namespace, :source_file => screen_output_path).css_from_assignments(self.semantic_classes)
return if semantic_styles.blank?
css = File.path_to_string(screen_output_path)
css += "\n\n/* semantic class names */\n"
css += semantic_styles
File.string_to_file(css.rstrip, screen_output_path)
end
def generate_tests
puts "\n Updating namespace to \"#{namespace}\" in test files:"
test_files = Compressor::TEST_FILES.map {|f| File.join(Blueprint::TEST_PATH, *f.split(/\//))}
test_files.each do |file|
puts " + #{file}"
Namespace.new(file, namespace)
end
end
def output_header
puts "\n"
puts " #{"*" * 100}"
puts " **"
puts " ** Blueprint CSS Compressor"
puts " **"
puts " ** Builds compressed files from the source directory."
puts " **"
puts " ** Loaded from settings.yml" if loaded_from_settings
puts " ** Namespace: '#{namespace}'" unless namespace.blank?
puts " ** Output to: #{destination_path}"
puts " ** Grid Settings:"
puts " ** - Column Count: #{self.custom_layout.column_count}"
puts " ** - Column Width: #{self.custom_layout.column_width}px"
puts " ** - Gutter Width: #{self.custom_layout.gutter_width}px"
puts " ** - Total Width : #{self.custom_layout.page_width}px"
puts " **"
puts " #{"*" * 100}"
end
def output_footer
puts "\n\n"
puts " #{"*" * 100}"
puts " **"
puts " ** Done!"
puts " ** Your compressed files and test files are now up-to-date."
puts " **"
puts " #{"*" * 100}\n\n"
end
def css_file_header
%(/* -----------------------------------------------------------------------
- Blueprint CSS Framework 0.7.1
- http://blueprintcss.googlecode.com
+ Blueprint CSS Framework 0.8
+ http://blueprintcss.org
- * Copyright (c) 2007-2008. See LICENSE for more info.
+ * Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */)
end
def putsv(str)
puts str if $verbose
end
end
-end
\ No newline at end of file
+end
diff --git a/public/blueprint/lib/blueprint/custom_layout.rb b/public/blueprint/lib/blueprint/custom_layout.rb
index f22a14a..71b34d4 100755
--- a/public/blueprint/lib/blueprint/custom_layout.rb
+++ b/public/blueprint/lib/blueprint/custom_layout.rb
@@ -1,55 +1,71 @@
require 'erb'
module Blueprint
# Generates a custom grid file, using ERB to evaluate custom settings
class CustomLayout
# path to ERB file used for CSS template
CSS_ERB_FILE = File.join(Blueprint::LIB_PATH, 'grid.css.erb')
- attr_writer :column_count, :column_width, :gutter_width
+ attr_writer :column_count, :column_width, :gutter_width, :input_padding, :input_border
# Column count of generated CSS. Returns itself or Blueprint's default
def column_count
(@column_count || Blueprint::COLUMN_COUNT).to_i
end
# Column width (in pixels) of generated CSS. Returns itself or Blueprint's default
def column_width
(@column_width || Blueprint::COLUMN_WIDTH).to_i
end
# Gutter width (in pixels) of generated CSS. Returns itself or Blueprint's default
def gutter_width
(@gutter_width || Blueprint::GUTTER_WIDTH).to_i
end
+
+ def input_padding
+ (@input_padding || Blueprint::INPUT_PADDING).to_i
+ end
+
+ def input_border
+ (@input_border || Blueprint::INPUT_BORDER).to_i
+ end
# Returns page width (in pixels)
def page_width
column_count * (column_width + gutter_width) - gutter_width
end
# ==== Options
# * <tt>options</tt>
# * <tt>:column_count</tt> -- Sets the column count of generated CSS
# * <tt>:column_width</tt> -- Sets the column width (in pixels) of generated CSS
# * <tt>:gutter_width</tt> -- Sets the gutter width (in pixels) of generated CSS
+ # * <tt>:input_padding</tt> -- Sets the input padding width (in pixels) of generated CSS
+ # * <tt>:input_border</tt> -- Sets the border width (in pixels) of generated CSS
def initialize(options = {})
- @column_count = options[:column_count]
- @column_width = options[:column_width]
- @gutter_width = options[:gutter_width]
+ @column_count = options[:column_count]
+ @column_width = options[:column_width]
+ @gutter_width = options[:gutter_width]
+ @input_padding = options[:input_padding]
+ @input_border = options[:input_border]
end
# Boolean value if current settings are Blueprint's defaults
def default?
- self.column_width == Blueprint::COLUMN_WIDTH && self.column_count == Blueprint::COLUMN_COUNT && self.gutter_width == Blueprint::GUTTER_WIDTH
+ self.column_width == Blueprint::COLUMN_WIDTH &&
+ self.column_count == Blueprint::COLUMN_COUNT &&
+ self.gutter_width == Blueprint::GUTTER_WIDTH &&
+ self.input_padding == Blueprint::INPUT_PADDING &&
+ self.input_border == Blueprint::INPUT_BORDER
end
# Loads grid.css.erb file, binds it to current instance, and returns output
def generate_grid_css
# loads up erb template to evaluate custom widths
css = ERB::new(File.path_to_string(CustomLayout::CSS_ERB_FILE))
# bind it to this instance
css.result(binding)
end
end
end
\ No newline at end of file
diff --git a/public/blueprint/lib/blueprint/grid.css.erb b/public/blueprint/lib/blueprint/grid.css.erb
index 7ff24c7..a17f33e 100755
--- a/public/blueprint/lib/blueprint/grid.css.erb
+++ b/public/blueprint/lib/blueprint/grid.css.erb
@@ -1,136 +1,136 @@
/* --------------------------------------------------------------
grid.css - mirror version of src/grid.css
-------------------------------------------------------------- */
/* A container should group all your columns. */
.container {
width: <%= page_width %>px;
margin: 0 auto;
}
/* Use this class on any div.span / container to see the grid. */
.showgrid {
background: url(src/grid.png);
}
-/* Body margin for a sensible default look. */
-body {
- margin:1.5em 0;
-}
-
/* Columns
-------------------------------------------------------------- */
/* Sets up basic grid floating and margin. */
-<%= (1..column_count).map {|c| "div.span-#{c}" }.join(", ") %> {
- float: left;
- margin-right: <%= gutter_width %>px;
+.column, <%= (1..column_count).map {|c| "div.span-#{c}" }.join(", ") %> {
+ float: left;
+ margin-right: <%= gutter_width %>px;
}
/* The last column in a row needs this class. */
-div.last { margin-right: 0; }
+.last, div.last { margin-right: 0; }
/* Use these classes to set the width of a column. */
.span-1 {width: <%= column_width %>px;}
<% (2..column_count-1).each do |column| %>
- .span-<%= column %> {width: <%= (column_width + ((column - 1) * (column_width + gutter_width))).to_i %>px;<%= "margin: 0;" if column == column_count %>}
-<% end %>
+.span-<%= column %> {width: <%= (column_width + ((column - 1) * (column_width + gutter_width))).to_i %>px;<%= "margin: 0;" if column == column_count %>}<% end %>
.span-<%= column_count %>, div.span-<%= column_count %> { width:<%= page_width %>px; margin:0; }
-/* Use these classes to set the width of a input. */
-input.span-1, textarea.span-1, select.span-1 {width: <%= column_width %>px!important;}
-<% (2..column_count-1).each do |column| %>
- input.span-<%= column %>, textarea.span-<%= column %>, select.span-<%= column %> {width: <%= (column_width - 10 - gutter_width + ((column - 1) * (column_width + gutter_width))).to_i %>px!important;<%= "margin: 0;" if column == column_count %>}
-<% end %>
-input.span-<%= column_count %>, textarea.span-<%= column_count %>, select.span-<%= column_count %> { width:<%= page_width - 10 %>px!important; }
+/* Use these classes to set the width of an input. */
+<%= (1..column_count).map {|column| "input.span-#{column}, textarea.span-#{column}"}.join(", ") %> {
+ border-left-width: <%= input_border %>px!important;
+ border-right-width: <%= input_border %>px!important;
+ padding-left: <%= input_padding %>px!important;
+ padding-right: <%= input_padding %>px!important;
+}
+<% (1..column_count).each do |column| %>
+input.span-<%= column %>, textarea.span-<%= column %> { width: <%= ((column_width + gutter_width) * (column - 1) + column_width - 2*(input_padding + input_border))%>px!important; }<% end %>
/* Add these to a column to append empty cols. */
<% (1..(column_count-1)).each do |column| %>
- .append-<%= column %> { padding-right: <%= (column * (column_width + gutter_width)).to_i %>px;}
-<% end %>
+.append-<%= column %> { padding-right: <%= (column * (column_width + gutter_width)).to_i %>px;}<% end %>
/* Add these to a column to prepend empty cols. */
<% (1..(column_count-1)).each do |column| %>
- .prepend-<%= column %> { padding-left: <%= (column * (column_width + gutter_width)).to_i %>px;}
-<% end %>
+.prepend-<%= column %> { padding-left: <%= (column * (column_width + gutter_width)).to_i %>px;}<% end %>
/* Border on right hand side of a column. */
div.border {
padding-right: <%= (gutter_width * 0.5 - 1).to_i %>px;
margin-right: <%= (gutter_width * 0.5).to_i %>px;
border-right: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
div.colborder {
- padding-right: <%= (column_width - 0.5*gutter_width - 1).to_i %>px;
- margin-right: <%= (column_width - 0.5 * gutter_width).to_i %>px;
+ padding-right: <%= (column_width + 2*gutter_width - 1)/2.to_i %>px;
+ margin-right: <%= (column_width + 2 * gutter_width)/2.to_i %>px;
border-right: 1px solid #eee;
}
/* Use these classes on an element to push it into the
next column, or to pull it into the previous column. */
<% (1..column_count).each do |column| %>
- .pull-<%= column %> { margin-left: -<%= (column * (column_width + gutter_width)).to_i %>px; }
-<% end %>
+.pull-<%= column %> { margin-left: -<%= (column * (column_width + gutter_width)).to_i %>px; }<% end %>
<%= (1..column_count).map {|c| ".pull-#{c}" }.join(", ") %> {float: left; position:relative;}
<% (1..(column_count)).each do |column| %>
- .push-<%= column %> { margin: 0 -<%= (column * (column_width + gutter_width)).to_i %>px 1.5em <%= (column * (column_width + gutter_width)).to_i %>px; }
-<% end %>
+.push-<%= column %> { margin: 0 -<%= (column * (column_width + gutter_width)).to_i %>px 1.5em <%= (column * (column_width + gutter_width)).to_i %>px; }<% end %>
<%= (1..column_count).map {|c| ".push-#{c}" }.join(", ") %> {float: right; position:relative;}
/* Misc classes and elements
-------------------------------------------------------------- */
+/* In case you need to add a gutter above/below an element */
+.prepend-top {
+ margin-top:1.5em;
+}
+.append-bottom {
+ margin-bottom:1.5em;
+}
+
/* Use a .box to create a padded box inside a column. */
.box {
padding: 1.5em;
margin-bottom: 1.5em;
background: #E5ECF9;
}
/* Use this to create a horizontal ruler across a column. */
hr {
background: #ddd;
color: #ddd;
clear: both;
float: none;
width: 100%;
height: .1em;
margin: 0 0 1.45em;
border: none;
}
+
hr.space {
background: #fff;
color: #fff;
}
/* Clearing floats without extra markup
Based on How To Clear Floats Without Structural Markup by PiE
[http://www.positioniseverything.net/easyclearing.html] */
.clearfix:after, .container:after {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
+ content: "\0020";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ overflow:hidden;
}
-.clearfix, .container {display: inline-block;}
-* html .clearfix,
-* html .container {height: 1%;}
.clearfix, .container {display: block;}
/* Regular clearing
apply to column that should drop below previous ones. */
.clear { clear:both; }
diff --git a/public/blueprint/lib/blueprint/semantic_class_names.rb b/public/blueprint/lib/blueprint/semantic_class_names.rb
index 41bd496..c17af1d 100755
--- a/public/blueprint/lib/blueprint/semantic_class_names.rb
+++ b/public/blueprint/lib/blueprint/semantic_class_names.rb
@@ -1,57 +1,57 @@
module Blueprint
# parses a hash of key/value pairs, key being output CSS selectors, value being a list of CSS selectors to draw from
class SemanticClassNames
attr_accessor :class_assignments
attr_reader :namespace, :source_file
# ==== Options
# * <tt>options</tt>
# * <tt>:namespace</tt> -- Namespace to be used when matching CSS selectors to draw from
# * <tt>:source_file</tt> -- Source file to use as reference of CSS selectors. Defaults to Blueprint's generated screen.css
# * <tt>:class_assignments</tt> -- Hash of key/value pairs, key being output CSS selectors, value being a list of CSS selectors to draw from
def initialize(options = {})
@namespace = options[:namespace] || ""
@source_file = options[:source_file] || File.join(Blueprint::BLUEPRINT_ROOT_PATH, 'screen.css')
self.class_assignments = options[:class_assignments] || {}
end
# Returns a CSS string of semantic selectors and associated styles
# ==== Options
# * <tt>assignments</tt> -- Hash of key/value pairs, key being output CSS selectors, value being a list of CSS selectors to draw from; defaults to what was passed in constructor or empty hash
def css_from_assignments(assignments = {})
assignments ||= self.class_assignments
# define a wrapper hash to hold all the new CSS assignments
output_css = {}
#loads full stylesheet into an array of hashes
blueprint_assignments = CSSParser.new(File.path_to_string(self.source_file)).parse
# iterates through each class assignment ('#footer' => '.span-24 div.span-24', '#header' => '.span-24 div.span-24')
assignments.each do |semantic_class, blueprint_classes|
# gathers all BP classes we're going to be mimicing
blueprint_classes = blueprint_classes.split(/,|\s/).find_all {|c| !c.blank? }.flatten.map {|c| c.strip }
classes = []
# loop through each BP class, grabbing the full hash (containing tags, index, and CSS rules)
blueprint_classes.each do |bp_class|
match = bp_class.include?('.') ? bp_class.gsub(".", ".#{self.namespace}") : ".#{self.namespace}#{bp_class}"
- classes << blueprint_assignments.find_all {|line| line[:tags] =~ Regexp.new(/^([\w\.\-]+, ?)*#{match}(, ?[\w\.\-]+)*$/) }.uniq
+ classes << blueprint_assignments.find_all {|line| line[:tags] =~ Regexp.new(/^([\w\.\-\:]+, ?)*#{match}(, ?[\w\.\-\:]+)*$/) }.uniq
end
# clean up the array
classes = classes.flatten.uniq
# set the semantic class to the rules gathered in classes, sorted by index
# this way, the styles will be applied in the correct order from top of file to bottom
output_css[semantic_class] = "#{classes.sort_by {|i| i[:idx]}.map {|i| i[:rules]}}"
end
# return the css in proper format
css = ""
output_css.each do |tags, rules|
css += "#{tags} {#{rules}}\n"
end
css
end
end
end
\ No newline at end of file
diff --git a/public/blueprint/lib/compress.rb b/public/blueprint/lib/compress.rb
index e173523..52731e8 100755
--- a/public/blueprint/lib/compress.rb
+++ b/public/blueprint/lib/compress.rb
@@ -1,149 +1,149 @@
#!/usr/bin/env ruby
-require 'blueprint/blueprint'
+require File.join(File.dirname(__FILE__), "blueprint", "blueprint")
# **Basic
#
# Calling this file by itself will pull files from blueprint/src and concatenate them into three files; ie.css, print.css, and screen.css.
#
# ruby compress.rb
#
# However, argument variables can be set to change how this works.
#
# Calling
#
# ruby compress.rb -h
#
# will reveal basic arguments you can pass to the compress.rb file.
#
# **Custom Settings
#
# To use custom settings, the file need to be stored in settings.yml within this directory. An example YAML file has been included.
#
# Another ability is to use YAML (spec is at http://www.yaml.org/spec/1.1/) for project settings in a predefined structure and
# store all pertinent information there. The YAML file has multiple keys (usually a named project) with a set of data that defines
# that project. A sample structure can be found in settings.example.yml.
#
# The basic structure is this:
#
# Root nodes are project names. You use these when calling compress.rb as such:
#
# ruby compress.rb -p PROJECTNAME
#
# A sample YAML with only roots and output paths would look like this:
#
# project1:
# path: /path/to/my/project/stylesheets
# project2:
# path: /path/to/different/stylesheets
# project3:
# path: /path/to/another/projects/styles
#
# You can then call
#
# ruby compress.rb -p project1
#
# or
#
# ruby compress.rb -p project3
#
# This would compress and export Blueprints CSS to the respective directory, checking for my-(ie|print|screen).css and
# appending it if present
#
# A more advanced structure would look like this:
#
# project1:
# path: /path/to/my/project/stylesheets
# namespace: custom-namespace-1-
# custom_css:
# ie.css:
# - custom-ie.css
# print.css:
# - docs.css
# - my-print-styles.css
# screen.css:
# - subfolder-of-stylesheets/sub_css.css
# custom_layout:
# column_count: 12
# column_width: 70
# gutter_width: 10
# project2:
# path: /path/to/different/stylesheets
# namespace: different-namespace-
# custom_css:
# screen.css:
# - custom_screen.css
# semantic_classes:
# "#footer, #header": column span-24 last
# "#content": column span-18 border
# "#extra-content": last span-6 column
# "div#navigation": last span-24 column
# "div.section, div.entry, .feeds": span-6 column
# plugins:
# - fancy-type
# - buttons
# - validations
# project3:
# path: /path/to/another/projects/styles
#
# In a structure like this, a lot more assignment is occurring. Custom namespaces are being set for two projects, while
# the third (project3) is just a simple path setting.
#
# Also, custom CSS is being used that is appended at the end of its respective file. So, in project1, print.css will have docs.css
# and my-print-styles.css instead of the default my-print.css. Note that these files are relative to the path that you defined above;
# you can use subdirectories from the default path if you would like.
#
# Another thing to note here is the custom_layout; if not defined, your generated CSS will default to the 24 column, 950px wide grid that
# has been standard with Blueprint for quite some time. However, you can specify a custom grid setup if you would like. The three options
# are column_count (the number of columns you want your grid to have), column width (the width in pixels that you want your columns to be), and
# gutter_width (the width in pixels you want your gutters - space between columns - to be). To use the Blueprint default, do not define this
# in your settings file.
#
# Semantic classes are still in the works within Blueprint, but a simple implementation has been created.
#
# Defining semantic_classes, with nodes underneath, will generate a class for each node which has rules of each class assigned to it. For example,
# in project2 above, for '#footer, #header', elements with id's of footer and header will be assigned all the rules from the
# classes 'span-24, column, and last', while divs with classes either entry or section, as well as any element with class of feed, is
# assigned all the rules from 'span-6 and column'. Although it is a crude way do accomplish this, it keeps the generated CSS separate from the core BP CSS.
#
# Also supported is plugins. The compressor looks within BLUEPRINT_DIR/blueprint/plugins to match against what's passed. If the plugin name
# matches, it will append PLUGIN/(screen|print|ie).css to the corresponding CSS file. It will append the plugin CSS to all three CSS files if
# there is a CSS file present named as the plugin (e.g. the fancy-type plugin with a fancy-type.css file found within the plugin directory)
#
# In Ruby, the structure would look like this:
#
# {
# 'project1' => {
# 'path' => '/path/to/my/project/stylesheets',
# 'namespace' => 'custom-namespace-1-',
# 'custom_css' => {
# 'ie.css' => ['custom-ie.css'],
# 'print.css' => ['docs.css', 'my-print-styles.css'],
# 'screen.css' => ['subfolder-of-stylesheets/sub_css.css']
# },
# 'custom_layout' => {
# 'column_count' => 12,
# 'column_width' => 70,
# 'gutter_width' => 10
# }
# },
# 'project2' => {
# 'path' => '/path/to/different/stylesheets',
# 'namespace' => 'different-namespace-',
# 'custom_css' => {
# 'screen.css' => ['custom_screen.css']
# },
# 'semantic_classes' => {
# '#footer, #header' => 'column span-24 last',
# '#content' => 'column span-18 border',
# '#extra-content' => 'last span-6 column',
# 'div#navigation' => 'last span-24 column',
# 'div.section, div.entry, .feeds' => 'span-6 column'
# },
# 'plugins' => ['fancy-type', 'buttons', 'validations']
# },
# 'project3' => {
# 'path' => '/path/to/another/projects/styles'
# }
# }
Blueprint::Compressor.new.generate!
\ No newline at end of file
diff --git a/public/blueprint/tests/index.html b/public/blueprint/tests/index.html
index ada1d10..ac1f5bb 100755
--- a/public/blueprint/tests/index.html
+++ b/public/blueprint/tests/index.html
@@ -1,82 +1,83 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Blueprint test pages</title>
<!-- Framework CSS -->
<link rel="stylesheet" href="../blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../blueprint/print.css" type="text/css" media="print">
<!--[if IE]><link rel="stylesheet" href="../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<style type="text/css" media="screen">
p, table, hr, .box { margin-bottom:25px; }
.box p { margin-bottom:10px; }
</style>
</head>
<body>
<div class="container">
<h1>Blueprint test pages</h1>
<hr>
<p>Welcome to the Blueprint test pages. The HTML files below tests most HTML elements, and especially classes provided
by Blueprint.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<th class="span-6">Test page</th>
<th class="span-8">Main files tested</th>
<th class="span-10">Description</th>
</tr>
<tr>
<td><a href="parts/sample.html">Sample page</a></td>
<td>
<a href="../blueprint/src/grid.css">grid.css</a>,
<a href="../blueprint/src/typography.css">typography.css</a>
</td>
<td>A simple sample page, with common elements.</td>
</tr>
<tr class="even">
<td><a href="parts/grid.html">Grid</a></td>
<td>
<a href="../blueprint/src/grid.css">grid.css</a>
</td>
<td>Tests classes provided by grid.css.</td>
</tr>
<tr>
<td><a href="parts/elements.html">Typography</a></td>
<td>
<a href="../blueprint/src/typography.css">typography.css</a>
</td>
<td>Tests HTML elements which gets set in typography.css.</td>
</tr>
<tr class="even">
<td><a href="parts/forms.html">Forms</a></td>
<td>
<a href="../blueprint/src/forms.css">forms.css</a>
</td>
<td>Tests classes and default look provided by forms.css.</td>
</tr>
</table>
<p><em><strong>Note about the compressed versions:</strong></em>
These test files utilize the compressed files. In other words, if you change any of the source files,
you'll have to re-compress them with the ruby script in the scripts folder to see any changes.</p>
<div class="box">
<p>For more information and help, try these resources:</p>
<ul class="bottom">
- <li><a href="http://code.google.com/p/blueprintcss">The Blueprint home page.</a></li>
- <li><a href="http://groups.google.com/group/blueprintcss">Our anything-goes mailing list.</a></li>
- <li><a href="http://bjorkoy.com">The blog where news about Blueprint gets posted.</a></li>
+ <li><a href="http://blueprintcss.org">The Blueprint home page</a></li>
+ <li><a href="http://github.com/joshuaclayton/blueprint-css/wikis/home">The Blueprint Wiki</a></li>
+ <li><a href="http://groups.google.com/group/blueprintcss">The Blueprint mailing list</a></li>
+ <li><a href="http://christianmontoya.com">The blog for news about Blueprint</a></li>
</ul>
</div>
<p><a href="http://validator.w3.org/check?uri=referer">
<img src="parts/valid.png" alt="Valid HTML 4.01 Strict" height="31" width="88" class="top"></a></p>
</div>
</body>
</html>
\ No newline at end of file
diff --git a/public/blueprint/tests/parts/sample.html b/public/blueprint/tests/parts/sample.html
index 6c69cf2..c8a40e5 100755
--- a/public/blueprint/tests/parts/sample.html
+++ b/public/blueprint/tests/parts/sample.html
@@ -1,87 +1,87 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Blueprint Sample Page</title>
<!-- Framework CSS -->
<link rel="stylesheet" href="../../blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="../../blueprint/print.css" type="text/css" media="print">
<!--[if IE]><link rel="stylesheet" href="../../blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<!-- Import fancy-type plugin for the sample page. -->
<link rel="stylesheet" href="../../blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
</head>
<body>
<div class="container">
<h1>A simple sample page</h1>
<hr>
<h2 class="alt">This sample page demonstrates a tiny fraction of what you get with Blueprint.</h2>
<hr>
<div class="span-7 colborder">
<h6>Here's a box</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.</p>
</div>
<div class="span-8 colborder">
<h6>And another box</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat laboris nisi ut aliquip.</p>
</div>
<div class="span-7 last">
<h6>This box is aligned with the sidebar</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip.</p>
</div>
<hr>
<hr class="space">
<div class="span-15 prepend-1 colborder">
- <p><img src="test.jpg" class="top pull-1" alt="test">Lorem ipsum dolor sit amet, <em>consectetuer adipiscing elit</em>. Nunc congue ipsum vestibulum libero. Aenean vitae justo. Nam eget tellus. Etiam convallis, est eu lobortis mattis, lectus tellus tempus felis, a ultricies erat ipsum at metus.</p>
+ <p><img src="test.jpg" class="top pull-1 left" alt="test">Lorem ipsum dolor sit amet, <em>consectetuer adipiscing elit</em>. Nunc congue ipsum vestibulum libero. Aenean vitae justo. Nam eget tellus. Etiam convallis, est eu lobortis mattis, lectus tellus tempus felis, a ultricies erat ipsum at metus.</p>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. <a href="#">Morbi et risus</a>. Aliquam nisl. Nulla facilisi. Cras accumsan vestibulum ante. Vestibulum sed tortor. Praesent <span class="caps">SMALL CAPS</span> tempus fringilla elit. Ut elit diam, sagittis in, nonummy in, gravida non, nunc. Ut orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Nam egestas, orci eu imperdiet malesuada, nisl purus fringilla odio, quis commodo est orci vitae justo. Aliquam placerat odio tincidunt nulla. Cras in libero. Aenean rutrum, magna non tristique posuere, erat odio eleifend nisl, non convallis est tortor blandit ligula. Nulla id augue.</p>
<p>Nullam mattis, odio ut tempus facilisis, metus nisl facilisis metus, auctor consectetuer felis ligula nec mauris. Vestibulum odio erat, fermentum at, commodo vitae, ultrices et, urna. Mauris vulputate, mi pulvinar sagittis condimentum, sem nulla aliquam velit, sed imperdiet mi purus eu magna. Nulla varius metus ut eros. Aenean aliquet magna eget orci. Class aptent taciti sociosqu ad litora.</p>
<p>Vivamus euismod. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Suspendisse vel nibh ut turpis dictum sagittis. Aliquam vel velit a elit auctor sollicitudin. Nam vel dui vel neque lacinia pretium. Quisque nunc erat, venenatis id, volutpat ut, scelerisque sed, diam. Mauris ante. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec mattis. Morbi dignissim sollicitudin libero. Nulla lorem.</p>
<blockquote>
<p>Integer cursus ornare mauris. Praesent nisl arcu, imperdiet eu, ornare id, scelerisque ut, nunc. Praesent sagittis erat sed velit tempus imperdiet. Ut tristique, ante in interdum hendrerit, erat enim faucibus felis, quis rutrum mauris lorem quis sem. Vestibulum ligula nisi, mattis nec, posuere et, blandit eu, ligula. Nam suscipit placerat odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Pellentesque tortor libero, venenatis vitae, rhoncus eu, placerat ut, mi. Nulla nulla.</p>
</blockquote>
<p>Maecenas vel metus quis magna pharetra fermentum. <em>Integer sit amet tortor</em>. Maecenas porttitor, pede sed gravida auctor, nulla augue aliquet elit, at pretium urna orci ut metus. Aliquam in dolor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, tellus id ornare posuere, quam nunc accumsan turpis, at convallis tellus orci et nisl. Phasellus congue neque a lorem.</p>
<hr>
<div class="span-7 colborder">
<h6>This is a nested column</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</div>
<div class="span-7 last">
<h6>This is another nested column</h6>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p>
</div>
</div>
<div class="span-7 last">
<h3>A <span class="alt">Simple</span> Sidebar</h3>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.</p>
<p>Mauris a lectus. Aliquam erat volutpat. Phasellus ultrices mi a sapien. Nunc rutrum egestas lorem. Duis ac sem sagittis elit tincidunt gravida. Mauris a lectus. Aliquam erat volutpat. Phasellus ultrices mi a sapien. Nunc rutrum egestas lorem. Duis ac sem sagittis elit tincidunt gravida.</p>
<p class="quiet">Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.</p>
<h5>Incremental leading</h5>
<p class="incr">Vestibulum ante ipsum primis in faucibus orci luctus vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus.</p>
<p class="incr">Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras ornare mattis nunc. Mauris venenatis, pede sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue. sed aliquet vehicula, lectus tellus pulvinar neque, non cursus sem nisi vel augue.</p>
</div>
<hr>
<h2 class="alt">You may pick and choose amongst these and many more features, so be bold.</h2>
<hr>
<p><a href="http://validator.w3.org/check?uri=referer">
<img src="valid.png" alt="Valid HTML 4.01 Strict" height="31" width="88" class="top"></a></p>
</div>
</body>
</html>
\ No newline at end of file
|
theflow/deployed_at
|
0137f975680bb5d29b8da773249cf59a3c74ff03
|
added subscriptions, a way to get notified about deploys
|
diff --git a/deployed_at.rb b/deployed_at.rb
index a8133c6..a73231b 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,126 +1,156 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
enable :sessions
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
+ has n, :subscriptions
+ has n, :users, :through => :subscriptions
+
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
class User
include DataMapper::Resource
property :id, Integer, :serial => true
property :email, String
+ has n, :subscriptions
+ has n, :projects, :through => :subscriptions
+
def self.find_or_create(email)
first(:email => email) || create(:email => email)
end
end
+class Subscription
+ include DataMapper::Resource
+
+ property :id, Integer, :serial => true
+
+ belongs_to :project
+ belongs_to :user
+end
+
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :list_deploys
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
get '/session' do
@projects = Project.all
@title = 'Log in'
erb :session_show
end
post '/session' do
redirect '/session' and return if params[:email].blank?
user = User.find_or_create(params[:email])
session[:user_id] = user.id
redirect '/subscriptions'
end
+get '/subscriptions' do
+ @projects = Project.all
+ redirect 'session' and return if session[:user_id].blank?
+
+ @user = User.get(session[:user_id])
+ @subscribed_projects = @user.projects
+ @title = 'Your subscriptions'
+ erb :subscriptions_list
+end
+
+post '/subscriptions' do
+ p param
+end
+
+
helpers do
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
diff --git a/views/subscriptions_list.erb b/views/subscriptions_list.erb
new file mode 100644
index 0000000..fbd77be
--- /dev/null
+++ b/views/subscriptions_list.erb
@@ -0,0 +1,16 @@
+<form action="/subscriptions" method="post">
+
+ <% for project in @projects %>
+ <div class="span-1 prepend-1">
+ <input type="checkbox" id="project_<%= project.id %>" name="<%= project.id %>" <%= 'checked="true"' if @subscribed_projects.include?(project) %>>
+ </div>
+ <div class="span-22 last">
+ <label for="project_<%= project.id %>"><%= project.name %></label>
+ </div>
+ <% end %>
+
+ <div class="span-1 prepend-1">
+ <input type="submit" value="Save"/>
+ </div>
+
+</form>
|
theflow/deployed_at
|
467abe25dacc22aca93d3d03a42b5d81ca5321e1
|
added a very simple login mechanism
|
diff --git a/deployed_at.rb b/deployed_at.rb
index 511e56b..a8133c6 100644
--- a/deployed_at.rb
+++ b/deployed_at.rb
@@ -1,98 +1,126 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
+enable :sessions
+
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
before :save, :set_proper_title
def set_proper_title
self.title = "Deploy of revision #{head_rev}" if title.blank?
end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
+class User
+ include DataMapper::Resource
+
+ property :id, Integer, :serial => true
+ property :email, String
+
+ def self.find_or_create(email)
+ first(:email => email) || create(:email => email)
+ end
+end
+
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :list_deploys
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
+get '/session' do
+ @projects = Project.all
+
+ @title = 'Log in'
+ erb :session_show
+end
+
+post '/session' do
+ redirect '/session' and return if params[:email].blank?
+
+ user = User.find_or_create(params[:email])
+ session[:user_id] = user.id
+
+ redirect '/subscriptions'
+end
+
helpers do
def format_time(time)
time.strftime('%b %d %H:%M')
end
-
-end
\ No newline at end of file
+end
diff --git a/views/session_show.erb b/views/session_show.erb
new file mode 100644
index 0000000..10a4641
--- /dev/null
+++ b/views/session_show.erb
@@ -0,0 +1,5 @@
+<form action="/session" method="post">
+ <label for="email">Email address:</label>
+ <input id="email" name="email" type="text" value=""/>
+ <input id="register" type="submit" value="Register"/>
+</form>
|
theflow/deployed_at
|
801eb49e2052e84818e6ced7a0ac27d9ba617eff
|
yet another rename
|
diff --git a/deployed_it.rb b/deployed_at.rb
similarity index 100%
rename from deployed_it.rb
rename to deployed_at.rb
diff --git a/public/deployed_it.css b/public/deployed_at.css
similarity index 100%
rename from public/deployed_it.css
rename to public/deployed_at.css
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 300dc57..fcda8b6 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,8 +1,8 @@
$: << File.join(File.dirname(__FILE__), '..')
require 'rubygems'
require 'context'
require 'sinatra'
require 'sinatra/test/unit'
-require 'deployed_it'
+require 'deployed_at'
diff --git a/views/layout.erb b/views/layout.erb
index f5f5e13..ba5e6c0 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -1,25 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= @title || 'Deployed It!' %></title>
<link type="text/css" href="/blueprint/blueprint/screen.css" rel="stylesheet" media="screen"/>
- <link type="text/css" href="/deployed_it.css" rel="stylesheet" media="screen"/>
+ <link type="text/css" href="/deployed_at.css" rel="stylesheet" media="screen"/>
</head>
<body>
<div class="container">
<h1><%= @title %></h1>
<p id="project_nav">
<% if @projects.size > 1 %>
<% for project in @projects %>
<a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
<% end %>
<% end %>
</p>
<hr />
<%= yield %>
</div>
</body>
</html>
\ No newline at end of file
|
theflow/deployed_at
|
a7e62561639908044cf085986a44ad48023216bb
|
set a proper title when none is given
|
diff --git a/deployed_it.rb b/deployed_it.rb
index da4fbe5..511e56b 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,93 +1,98 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :head_rev, String
property :current_rev, String
property :changes, Integer, :default => 0
property :scm_log, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
+ before :save, :set_proper_title
+
+ def set_proper_title
+ self.title = "Deploy of revision #{head_rev}" if title.blank?
+ end
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :list_deploys
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title],
:user => params[:user],
:scm_log => params[:scm_log],
:head_rev => params[:head_rev],
:current_rev => params[:current_rev])
end
helpers do
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
\ No newline at end of file
|
theflow/deployed_at
|
f83b6329c92d20a1861ae7867bcc9175c93b6e78
|
store more finegrained infos about each deploy
|
diff --git a/deployed_it.rb b/deployed_it.rb
index f7a91c5..da4fbe5 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,87 +1,93 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
- property :id, Integer, :serial => true
- property :title, String
- property :user, String
- property :changes, Integer, :default => 0
- property :body, Text
- property :project_id, Integer
- property :created_at, DateTime
+ property :id, Integer, :serial => true
+ property :title, String
+ property :user, String
+ property :head_rev, String
+ property :current_rev, String
+ property :changes, Integer, :default => 0
+ property :scm_log, Text
+ property :project_id, Integer
+ property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
- body.blank? ? 0 : body.scan(/^r\d+/).size
+ scm_log.blank? ? 0 : scm_log.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :list_deploys
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
post '/deploys' do
project = Project.find_or_create(params[:project])
- project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
+ project.deploys.create(:title => params[:title],
+ :user => params[:user],
+ :scm_log => params[:scm_log],
+ :head_rev => params[:head_rev],
+ :current_rev => params[:current_rev])
end
helpers do
def format_time(time)
time.strftime('%b %d %H:%M')
end
end
\ No newline at end of file
diff --git a/test/test_deployedat.rb b/test/test_deployedat.rb
index 5e759b3..9fd382b 100644
--- a/test/test_deployedat.rb
+++ b/test/test_deployedat.rb
@@ -1,23 +1,23 @@
require File.join(File.dirname(__FILE__), 'test_helper')
class DeployTest < Test::Unit::TestCase
test 'number of changeset should be zero if zero changesets exist' do
- deploy = Deploy.new(:body => '')
+ deploy = Deploy.new(:scm_log => '')
assert_equal 0, deploy.get_number_of_changes
- deploy = Deploy.new(:body => nil)
+ deploy = Deploy.new(:scm_log => nil)
assert_equal 0, deploy.get_number_of_changes
end
test 'number of changesets should be one for one changeset' do
- deploy = Deploy.new(:body => File.read('changesets/one_changeset.txt'))
+ deploy = Deploy.new(:scm_log => File.read('changesets/one_changeset.txt'))
assert_equal 1, deploy.get_number_of_changes
end
test 'number of changesets should be a lot for many changesets' do
- deploy = Deploy.new(:body => File.read('changesets/two_changesets.txt'))
+ deploy = Deploy.new(:scm_log => File.read('changesets/two_changesets.txt'))
assert_equal 2, deploy.get_number_of_changes
end
end
\ No newline at end of file
diff --git a/views/show_deploy.erb b/views/show_deploy.erb
index 4509158..623e22e 100644
--- a/views/show_deploy.erb
+++ b/views/show_deploy.erb
@@ -1,5 +1,5 @@
<h3 class="quiet">by <%= @deploy.user %> on <%= format_time(@deploy.created_at) %></h3>
<pre>
-<%= @deploy.body %>
+<%= @deploy.scm_log %>
</pre>
|
theflow/deployed_at
|
58035c4023e66aab1925c0c320f0da90a470f688
|
use standard net/http instead of rest-open-uri
|
diff --git a/client.rb b/client.rb
index 3e97236..e6f72ee 100644
--- a/client.rb
+++ b/client.rb
@@ -1,32 +1,24 @@
-#!/usr/bin/ruby -rubygems
-require 'rest-open-uri'
+#!/usr/bin/ruby
+require 'net/http'
require 'uri'
require 'cgi'
class DeployedItClient
def initialize(service_root)
@service_root = service_root
end
- def form_encoded(hash)
- encoded = []
- hash.each do |key, value|
- encoded << CGI.escape(key) + '=' + CGI.escape(value)
- end
-
- encoded.join('&')
- end
-
def new_deploy(user, title)
deploy_body = File.read('test/changesets/two_changesets.txt')
- representation = form_encoded({"user" => user,
- "title" => title,
- "body" => deploy_body,
- "project" => "Main App" })
+ args = {'user' => user,
+ 'title' => title,
+ 'body' => deploy_body,
+ 'project' => 'Main App' }
- response = open(@service_root + '/deploys', :method => :post, :body => representation)
+ url = URI.parse(@service_root + '/deploys')
+ Net::HTTP.post_form(url, args)
end
end
client = DeployedItClient.new('http://localhost:4567')
client.new_deploy(ENV['USER'], ARGV.first)
|
theflow/deployed_at
|
ba8c367c3d6df7007a85f1f4d7f337fad20bd44f
|
let's do some testing
|
diff --git a/client.rb b/client.rb
index 46fa26a..3e97236 100644
--- a/client.rb
+++ b/client.rb
@@ -1,32 +1,32 @@
#!/usr/bin/ruby -rubygems
require 'rest-open-uri'
require 'uri'
require 'cgi'
class DeployedItClient
def initialize(service_root)
@service_root = service_root
end
def form_encoded(hash)
encoded = []
hash.each do |key, value|
encoded << CGI.escape(key) + '=' + CGI.escape(value)
end
encoded.join('&')
end
def new_deploy(user, title)
- deploy_body = File.read('changesets/two_changesets.txt')
+ deploy_body = File.read('test/changesets/two_changesets.txt')
representation = form_encoded({"user" => user,
"title" => title,
"body" => deploy_body,
- "project" => "Main Project" })
+ "project" => "Main App" })
response = open(@service_root + '/deploys', :method => :post, :body => representation)
end
end
client = DeployedItClient.new('http://localhost:4567')
client.new_deploy(ENV['USER'], ARGV.first)
diff --git a/changesets/one_changeset.txt b/test/changesets/one_changeset.txt
similarity index 100%
rename from changesets/one_changeset.txt
rename to test/changesets/one_changeset.txt
diff --git a/changesets/two_changesets.txt b/test/changesets/two_changesets.txt
similarity index 100%
rename from changesets/two_changesets.txt
rename to test/changesets/two_changesets.txt
diff --git a/test/test_deployedat.rb b/test/test_deployedat.rb
new file mode 100644
index 0000000..5e759b3
--- /dev/null
+++ b/test/test_deployedat.rb
@@ -0,0 +1,23 @@
+require File.join(File.dirname(__FILE__), 'test_helper')
+
+class DeployTest < Test::Unit::TestCase
+
+ test 'number of changeset should be zero if zero changesets exist' do
+ deploy = Deploy.new(:body => '')
+ assert_equal 0, deploy.get_number_of_changes
+
+ deploy = Deploy.new(:body => nil)
+ assert_equal 0, deploy.get_number_of_changes
+ end
+
+ test 'number of changesets should be one for one changeset' do
+ deploy = Deploy.new(:body => File.read('changesets/one_changeset.txt'))
+ assert_equal 1, deploy.get_number_of_changes
+ end
+
+ test 'number of changesets should be a lot for many changesets' do
+ deploy = Deploy.new(:body => File.read('changesets/two_changesets.txt'))
+ assert_equal 2, deploy.get_number_of_changes
+ end
+
+end
\ No newline at end of file
diff --git a/test/test_helper.rb b/test/test_helper.rb
new file mode 100644
index 0000000..300dc57
--- /dev/null
+++ b/test/test_helper.rb
@@ -0,0 +1,8 @@
+$: << File.join(File.dirname(__FILE__), '..')
+
+require 'rubygems'
+require 'context'
+require 'sinatra'
+require 'sinatra/test/unit'
+
+require 'deployed_it'
|
theflow/deployed_at
|
cd81f6f00e97e03df319579cfbf4e69595148822
|
moved css styles into seperate file
|
diff --git a/public/deployed_it.css b/public/deployed_it.css
new file mode 100644
index 0000000..22a8e49
--- /dev/null
+++ b/public/deployed_it.css
@@ -0,0 +1,23 @@
+#project_nav {
+ margin: 0 0 10px 1px;
+}
+
+#project_nav a {
+ text-decoration: none;
+ background-color: #381392;
+ border: 1px solid #381392;
+ color: white;
+ padding: 2px 5px;
+ margin-right: 5px;
+}
+
+#project_nav a:hover,
+#project_nav a.active {
+ color: #001092;
+ background-color: white;
+}
+
+pre {
+ font-family: Monaco, "Lucida Console", monospace;
+ font-size: 12px;
+}
diff --git a/views/layout.erb b/views/layout.erb
index 1724d66..f5f5e13 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -1,49 +1,25 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= @title || 'Deployed It!' %></title>
<link type="text/css" href="/blueprint/blueprint/screen.css" rel="stylesheet" media="screen"/>
- <style>
- #project_nav {
- margin: 0 0 10px 1px;
- }
-
- #project_nav a {
- text-decoration: none;
- background-color: #381392;
- border: 1px solid #381392;
- color: white;
- padding: 2px 5px;
- margin-right: 5px;
- }
-
- #project_nav a:hover,
- #project_nav a.active {
- color: #001092;
- background-color: white;
- }
-
- pre {
- font-family: Monaco, "Lucida Console", monospace;
- font-size: 12px;
- }
- </style>
+ <link type="text/css" href="/deployed_it.css" rel="stylesheet" media="screen"/>
</head>
<body>
<div class="container">
<h1><%= @title %></h1>
<p id="project_nav">
<% if @projects.size > 1 %>
<% for project in @projects %>
<a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
<% end %>
<% end %>
</p>
<hr />
<%= yield %>
</div>
</body>
</html>
\ No newline at end of file
|
theflow/deployed_at
|
57fd051350ae828667a9519a15ac7b7a09a1f900
|
made the single deploy look a bit nicer
|
diff --git a/deployed_it.rb b/deployed_it.rb
index d1b1398..f7a91c5 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,80 +1,87 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :changes, Integer, :default => 0
property :body, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
body.blank? ? 0 : body.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
if @projects.size == 0
@title = "Deployed It!"
erb "<p>No deploys recorded yet</p>"
else
redirect "/projects/#{@projects.first.id}"
end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys.all(:order => [:created_at.desc])
@title = "Recent deploys for #{@project.name}"
erb :list_deploys
end
get '/deploys/:id' do
@projects = Project.all
@deploy = Deploy.get(params[:id])
@project = @deploy.project
@title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
end
+
+helpers do
+ def format_time(time)
+ time.strftime('%b %d %H:%M')
+ end
+
+end
\ No newline at end of file
diff --git a/views/layout.erb b/views/layout.erb
index 9b28685..1724d66 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -1,45 +1,49 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= @title || 'Deployed It!' %></title>
<link type="text/css" href="/blueprint/blueprint/screen.css" rel="stylesheet" media="screen"/>
<style>
#project_nav {
margin: 0 0 10px 1px;
}
-
+
#project_nav a {
text-decoration: none;
background-color: #381392;
border: 1px solid #381392;
color: white;
padding: 2px 5px;
margin-right: 5px;
}
-
+
#project_nav a:hover,
#project_nav a.active {
color: #001092;
background-color: white;
}
-
+
+ pre {
+ font-family: Monaco, "Lucida Console", monospace;
+ font-size: 12px;
+ }
</style>
</head>
<body>
<div class="container">
<h1><%= @title %></h1>
<p id="project_nav">
<% if @projects.size > 1 %>
<% for project in @projects %>
<a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
<% end %>
<% end %>
</p>
<hr />
<%= yield %>
</div>
</body>
</html>
\ No newline at end of file
diff --git a/views/list_deploys.erb b/views/list_deploys.erb
index 204e149..68fd804 100644
--- a/views/list_deploys.erb
+++ b/views/list_deploys.erb
@@ -1,10 +1,10 @@
<table>
<% @deploys.each_with_index do |deploy, i| %>
<tr class="large <%= i % 2 == 0 ? 'even' : '' %>">
<td><a href="/deploys/<%= deploy.id %>"><%= deploy.title %></a> <span class="small">(<%= deploy.changes %> changes)</span></td>
<td>by <%= deploy.user %></td>
- <td class="quiet"><%= deploy.created_at.strftime('%b %d %H:%M') %></td>
+ <td class="quiet"><%= format_time(deploy.created_at) %></td>
<td><%= deploy.project.name %></td>
</tr>
<% end %>
</table>
diff --git a/views/show_deploy.erb b/views/show_deploy.erb
index 5ace3de..4509158 100644
--- a/views/show_deploy.erb
+++ b/views/show_deploy.erb
@@ -1,7 +1,5 @@
-<h1><%= @deploy.title %></h1>
-<h3 class="quiet">by <%= @deploy.user %> at <% @deploy.created_at %></h3>
-<hr />
+<h3 class="quiet">by <%= @deploy.user %> on <%= format_time(@deploy.created_at) %></h3>
<pre>
- <%= @deploy.body %>
+<%= @deploy.body %>
</pre>
|
theflow/deployed_at
|
590b307aef1e5871ee8cdb8011ddd357e6c28db6
|
wasn't showing the projects name
|
diff --git a/views/list_deploys.erb b/views/list_deploys.erb
index d284679..204e149 100644
--- a/views/list_deploys.erb
+++ b/views/list_deploys.erb
@@ -1,10 +1,10 @@
<table>
<% @deploys.each_with_index do |deploy, i| %>
<tr class="large <%= i % 2 == 0 ? 'even' : '' %>">
<td><a href="/deploys/<%= deploy.id %>"><%= deploy.title %></a> <span class="small">(<%= deploy.changes %> changes)</span></td>
<td>by <%= deploy.user %></td>
<td class="quiet"><%= deploy.created_at.strftime('%b %d %H:%M') %></td>
- <td><%= deploy.project %></td>
+ <td><%= deploy.project.name %></td>
</tr>
<% end %>
</table>
|
theflow/deployed_at
|
03d2072cdd8f2abbc696149a10454f9ee1088688
|
put project navigation into the layout
|
diff --git a/deployed_it.rb b/deployed_it.rb
index 6485596..d1b1398 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,69 +1,80 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :changes, Integer, :default => 0
property :body, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
body.blank? ? 0 : body.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
- @deploys = Deploy.all(:order => [:created_at.desc])
- erb :list_deploys
+
+ if @projects.size == 0
+ @title = "Deployed It!"
+ erb "<p>No deploys recorded yet</p>"
+ else
+ redirect "/projects/#{@projects.first.id}"
+ end
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
- @deploys = @project.deploys
- erb :list_deploys
-end
+ @deploys = @project.deploys.all(:order => [:created_at.desc])
-post '/deploys' do
- project = Project.find_or_create(params[:project])
- project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
+ @title = "Recent deploys for #{@project.name}"
+ erb :list_deploys
end
get '/deploys/:id' do
+ @projects = Project.all
@deploy = Deploy.get(params[:id])
+ @project = @deploy.project
+
+ @title = "[#{@project.name}] #{@deploy.title}"
erb :show_deploy
end
+
+post '/deploys' do
+ project = Project.find_or_create(params[:project])
+ project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
+end
diff --git a/views/layout.erb b/views/layout.erb
index 6ed5cb3..9b28685 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -1,35 +1,45 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= @title || 'Deployed It!' %></title>
<link type="text/css" href="/blueprint/blueprint/screen.css" rel="stylesheet" media="screen"/>
<style>
#project_nav {
margin: 0 0 10px 1px;
}
#project_nav a {
text-decoration: none;
background-color: #381392;
border: 1px solid #381392;
color: white;
padding: 2px 5px;
margin-right: 5px;
}
#project_nav a:hover,
#project_nav a.active {
color: #001092;
background-color: white;
}
</style>
-
</head>
<body>
<div class="container">
+ <h1><%= @title %></h1>
+
+ <p id="project_nav">
+ <% if @projects.size > 1 %>
+ <% for project in @projects %>
+ <a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
+ <% end %>
+ <% end %>
+ </p>
+ <hr />
+
<%= yield %>
</div>
</body>
</html>
\ No newline at end of file
diff --git a/views/list_deploys.erb b/views/list_deploys.erb
index e12429c..d284679 100644
--- a/views/list_deploys.erb
+++ b/views/list_deploys.erb
@@ -1,21 +1,10 @@
-<h1>Recent deploys</h1>
-
-<p id="project_nav">
-<% if @projects.size > 1 %>
- <% for project in @projects %>
- <a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
- <% end %>
-<% end %>
-</p>
-<hr />
-
<table>
<% @deploys.each_with_index do |deploy, i| %>
<tr class="large <%= i % 2 == 0 ? 'even' : '' %>">
<td><a href="/deploys/<%= deploy.id %>"><%= deploy.title %></a> <span class="small">(<%= deploy.changes %> changes)</span></td>
<td>by <%= deploy.user %></td>
<td class="quiet"><%= deploy.created_at.strftime('%b %d %H:%M') %></td>
<td><%= deploy.project %></td>
</tr>
<% end %>
</table>
|
theflow/deployed_at
|
a90c1d4d540452aed3c11ae1b2406b000e3ed2be
|
renamed erb templates
|
diff --git a/deployed_it.rb b/deployed_it.rb
index 7c91ac9..6485596 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,69 +1,69 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :changes, Integer, :default => 0
property :body, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
body.blank? ? 0 : body.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
@projects = Project.all
@deploys = Deploy.all(:order => [:created_at.desc])
- erb :index
+ erb :list_deploys
end
get '/projects/:id' do
@projects = Project.all
@project = Project.get(params[:id])
@deploys = @project.deploys
- erb :index
+ erb :list_deploys
end
post '/deploys' do
project = Project.find_or_create(params[:project])
project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
- erb :show
+ erb :show_deploy
end
diff --git a/views/index.erb b/views/list_deploys.erb
similarity index 100%
rename from views/index.erb
rename to views/list_deploys.erb
diff --git a/views/show.erb b/views/show_deploy.erb
similarity index 100%
rename from views/show.erb
rename to views/show_deploy.erb
|
theflow/deployed_at
|
272640a08380dd9a9c160646a46d03eafc1db17b
|
basic support for multiple projects
|
diff --git a/deployed_it.rb b/deployed_it.rb
index 53c50e4..7c91ac9 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,62 +1,69 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :changes, Integer, :default => 0
property :body, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
body.blank? ? 0 : body.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
+ @projects = Project.all
@deploys = Deploy.all(:order => [:created_at.desc])
erb :index
end
+get '/projects/:id' do
+ @projects = Project.all
+ @project = Project.get(params[:id])
+ @deploys = @project.deploys
+ erb :index
+end
+
post '/deploys' do
project = Project.find_or_create(params[:project])
- puts project.id
project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
erb :show
end
diff --git a/views/index.erb b/views/index.erb
index 9bdb97a..e12429c 100644
--- a/views/index.erb
+++ b/views/index.erb
@@ -1,13 +1,21 @@
<h1>Recent deploys</h1>
+
+<p id="project_nav">
+<% if @projects.size > 1 %>
+ <% for project in @projects %>
+ <a <%= 'class="active"' if @project && @project == project %> href="/projects/<%= project.id %>"><%= project.name %></a>
+ <% end %>
+<% end %>
+</p>
<hr />
<table>
<% @deploys.each_with_index do |deploy, i| %>
<tr class="large <%= i % 2 == 0 ? 'even' : '' %>">
<td><a href="/deploys/<%= deploy.id %>"><%= deploy.title %></a> <span class="small">(<%= deploy.changes %> changes)</span></td>
<td>by <%= deploy.user %></td>
<td class="quiet"><%= deploy.created_at.strftime('%b %d %H:%M') %></td>
<td><%= deploy.project %></td>
</tr>
<% end %>
</table>
diff --git a/views/layout.erb b/views/layout.erb
index 982a697..6ed5cb3 100644
--- a/views/layout.erb
+++ b/views/layout.erb
@@ -1,13 +1,35 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><%= @title || 'Deployed It!' %></title>
<link type="text/css" href="/blueprint/blueprint/screen.css" rel="stylesheet" media="screen"/>
+ <style>
+ #project_nav {
+ margin: 0 0 10px 1px;
+ }
+
+ #project_nav a {
+ text-decoration: none;
+ background-color: #381392;
+ border: 1px solid #381392;
+ color: white;
+ padding: 2px 5px;
+ margin-right: 5px;
+ }
+
+ #project_nav a:hover,
+ #project_nav a.active {
+ color: #001092;
+ background-color: white;
+ }
+
+ </style>
+
</head>
<body>
<div class="container">
<%= yield %>
</div>
</body>
</html>
\ No newline at end of file
|
theflow/deployed_at
|
a27c978c0c7281df00fb553232c78a8611ec6e14
|
was only needed in the beginning
|
diff --git a/deployed_it.rb b/deployed_it.rb
index 74dd6f6..53c50e4 100644
--- a/deployed_it.rb
+++ b/deployed_it.rb
@@ -1,67 +1,62 @@
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'dm-timestamps'
DataMapper.setup(:default, "sqlite3://#{Dir.pwd}/database.sqlite3")
class Deploy
include DataMapper::Resource
property :id, Integer, :serial => true
property :title, String
property :user, String
property :changes, Integer, :default => 0
property :body, Text
property :project_id, Integer
property :created_at, DateTime
belongs_to :project
before :save, :set_number_of_changes
def set_number_of_changes
self.changes = get_number_of_changes
end
def get_number_of_changes
body.blank? ? 0 : body.scan(/^r\d+/).size
end
end
class Project
include DataMapper::Resource
property :id, Integer, :serial => true
property :name, String
has n, :deploys
def self.find_or_create(name)
project = self.first(:name => name)
project || self.create(:name => name)
end
end
DataMapper.auto_upgrade!
get '/' do
@deploys = Deploy.all(:order => [:created_at.desc])
erb :index
end
post '/deploys' do
project = Project.find_or_create(params[:project])
puts project.id
project.deploys.create(:title => params[:title], :user => params[:user], :body => params[:body])
end
get '/deploys/:id' do
@deploy = Deploy.get(params[:id])
erb :show
end
-
-get '/create' do
- deploy = Deploy.new(:title => 'First Deploy', :user => 'Florian')
- deploy.save
-end
|
theflow/deployed_at
|
333128881cd86522aec925862702cbc96133ca59
|
added changed database name to gitignore
|
diff --git a/.gitignore b/.gitignore
index e5b6a09..de6cb5d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-deployed_it.sqlite3
+database.sqlite3
.DS_Store
|
rfk/xrcwidgets
|
b25f02a7805c65ed85d379ef593463e9fe6ea3a3
|
Add unmaintained notice to readme.
|
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0e4274c
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+
+Status: Unmaintained
+====================
+
+[](http://unmaintained.tech/)
+
+I am [no longer actively maintaining this project](https://rfk.id.au/blog/entry/archiving-open-source-projects/).
+
+
+XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
+=======================================================================
+
+XRC is a wxWidgets standard for describing a GUI in an XML file. This module
+provides facilities to easily incorporate GUI components ('widgets') whose
+layout is defined in such a file.
+
diff --git a/README.txt b/README.txt
deleted file mode 100644
index d0bd699..0000000
--- a/README.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-
- XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
-
-XRC is a wxWidgets standard for describing a GUI in an XML file. This module
-provides facilities to easily incorporate GUI components ('widgets') whose
-layout is defined in such a file.
-
|
rfk/xrcwidgets
|
6f5b61805de72351428e64f92f6c873b4daf6b33
|
use wx.CallAfter to fire the on_create event
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 29c401a..b6ecc9e 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,519 +1,525 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the MIT license
# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
__ver_major__ = 0
__ver_minor__ = 3
__ver_patch__ = 0
__ver_sub__ = ""
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
__ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class NotGiven:
"""Sentinal to indicate that no value was given for an argument."""
pass
class XRCWidget(object):
"""Mix-in class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
+ # When this event is fired, we know the widget is fully initialized.
+ _initEvent = wx.EVT_WINDOW_CREATE
+
def __init__(self,parent=NotGiven):
self._xmltree = None
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
pre = self._getPre()
if parent is NotGiven:
# Assume the caller is doing two-phase creation themselves.
self.PostCreate(pre)
- self.Bind(wx.EVT_WINDOW_CREATE,self.on_create)
+ self.Bind(self._initEvent,self._handle_on_create)
else:
# Delegate the two-phase create to the XRC loader
self._loadXRCFile(self._xrcfile,pre,parent)
- def on_create(self,event=None):
- self.Unbind(wx.EVT_WINDOW_CREATE)
+ def _handle_on_create(self,event=None):
+ self.Unbind(self._initEvent)
+ wx.CallAfter(self.on_create)
+
+ def on_create(self):
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
@classmethod
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
@staticmethod
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
def _loadXRCFile(self,fileNm,pre,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation.
<pre> must be the pre-initialised widget object to load into, and
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
xrcres = xrc.XmlResource(fileNm)
- if self._xrcname is not None:
- resName = self._xrcname
- else:
- resName = self.__class__.__name__
- self._loadOn(xrcres,pre,parent,resName)
+ if self._xrcname is None:
+ self._xrcname = self.__class__.__name__
+ self._loadOn(xrcres,pre,parent,self._xrcname)
self.PostCreate(pre)
self.on_create()
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
+ if self._xrcname is None:
+ self._xrcname = self.__class__.__name__
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## Methods for obtaining references to child widgets
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
- except:
+ except KeyError:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type '%s'"%(cName,data.attrs["class"],))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(XRCWidget,wx.Panel):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(XRCWidget,wx.Dialog):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(XRCWidget,wx.Frame):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
|
rfk/xrcwidgets
|
73b41fcab63a36d04c5d2ae004725dde1a33d4b8
|
unbind EVT_WINDOW_CREATE after we're finished with it.
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index f18b5c2..29c401a 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,518 +1,519 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the MIT license
# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
__ver_major__ = 0
__ver_minor__ = 3
__ver_patch__ = 0
__ver_sub__ = ""
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
__ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class NotGiven:
"""Sentinal to indicate that no value was given for an argument."""
pass
class XRCWidget(object):
"""Mix-in class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent=NotGiven):
self._xmltree = None
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
pre = self._getPre()
if parent is NotGiven:
# Assume the caller is doing two-phase creation themselves.
self.PostCreate(pre)
self.Bind(wx.EVT_WINDOW_CREATE,self.on_create)
else:
# Delegate the two-phase create to the XRC loader
self._loadXRCFile(self._xrcfile,pre,parent)
def on_create(self,event=None):
+ self.Unbind(wx.EVT_WINDOW_CREATE)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
@classmethod
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
@staticmethod
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
def _loadXRCFile(self,fileNm,pre,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation.
<pre> must be the pre-initialised widget object to load into, and
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
xrcres = xrc.XmlResource(fileNm)
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(xrcres,pre,parent,resName)
self.PostCreate(pre)
self.on_create()
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## Methods for obtaining references to child widgets
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type '%s'"%(cName,data.attrs["class"],))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(XRCWidget,wx.Panel):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(XRCWidget,wx.Dialog):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(XRCWidget,wx.Frame):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
|
rfk/xrcwidgets
|
b104c3ea3ba7147beb0c83e4ef623a9ae42b8c62
|
fix old usage of self.OnCreate => self.on_create
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 22365f4..f18b5c2 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,520 +1,518 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the MIT license
# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
__ver_major__ = 0
__ver_minor__ = 3
__ver_patch__ = 0
__ver_sub__ = ""
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
__ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class NotGiven:
"""Sentinal to indicate that no value was given for an argument."""
pass
class XRCWidget(object):
"""Mix-in class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent=NotGiven):
self._xmltree = None
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
pre = self._getPre()
if parent is NotGiven:
# Assume the caller is doing two-phase creation themselves.
self.PostCreate(pre)
self.Bind(wx.EVT_WINDOW_CREATE,self.on_create)
else:
# Delegate the two-phase create to the XRC loader
self._loadXRCFile(self._xrcfile,pre,parent)
def on_create(self,event=None):
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
@classmethod
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
@staticmethod
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
def _loadXRCFile(self,fileNm,pre,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation.
<pre> must be the pre-initialised widget object to load into, and
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
xrcres = xrc.XmlResource(fileNm)
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(xrcres,pre,parent,resName)
self.PostCreate(pre)
- self.OnCreate()
+ self.on_create()
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## Methods for obtaining references to child widgets
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type '%s'"%(cName,data.attrs["class"],))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(XRCWidget,wx.Panel):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(XRCWidget,wx.Dialog):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(XRCWidget,wx.Frame):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent=NotGiven,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
-
-
diff --git a/examples/demo.py b/examples/demo.py
index 97b3af1..96533b6 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,51 +1,51 @@
import wx
from XRCWidgets import XRCApp, XRCDialog
from demo_widgets import DemoPanel
# Simple frame to demonstrate the use of menus and toolbar.
# Also shows how on_content() can be used to place widgets at creation time.
class DemoApp(XRCApp):
def on_m_file_exit_activate(self,evt):
"""Close the application"""
self.Close()
def on_m_file_new_activate(self,evt):
"""Create a new DemoPanel in the display area."""
dsp = self.getChild("displayarea")
p = DemoPanel(dsp)
self.replaceInWindow(dsp,p)
- def on_tb_new_activate(self):
+ def on_tb_new_activate(self,evt):
self.on_m_file_new_activate(None)
def on_m_help_about_activate(self,evt):
"""Show the About dialog."""
dlg = AboutDemoDialog(self)
dlg.ShowModal()
dlg.Destroy()
- def on_tb_about_activate(self):
+ def on_tb_about_activate(self,evt):
self.on_m_help_about_activate(None)
def on_displayarea_content(self,ctrl):
"""Initialise display area to contain a DemoPanel."""
return DemoPanel(ctrl)
# About Dialog demonstrates how to explicitly set widget name
# Other properies such as filename (_xrcfilename) and file location
# (_xrcfile) can be set similarly
class AboutDemoDialog(XRCDialog):
_xrcname = "about"
# Instantiate and run the application
def run():
app = DemoApp()
app.MainLoop()
|
rfk/xrcwidgets
|
da24341223c6c7fecbb7baa4a9ddadf28419deb7
|
initialisation => creation
|
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 1c8b2aa..069ade3 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,21 +1,21 @@
v0.3.0:
- * Let XRCWidget subclasses participate in two-phase initialisation
+ * Let XRCWidget subclasses participate in two-phase creation
* this allows you to name an XRCWidget in a 'subclass' attribute of the
XRC file, and have it create automatically
* for this to work, it must be possible to call the widget's __init__
method without arguments; post-initialisation steps should be moved
to the new "on_create" method.
v0.2.1:
* Relicensed under the MIT License (I find it simpler than BSD)
* Don't require the module to be importable in setup.py
v0.2.0:
* Relicensed under the BSD License
* Dropped support for python < 2.4 and wxPython < 2.6
* "VERSION" and related constants are now "__version__" and friends
|
rfk/xrcwidgets
|
01c7bf17c79b568fc33052e29dfd355ddd13cc30
|
allow XRCWidget subclasses to participate directly in two-phase creation
|
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 7c64b5e..1c8b2aa 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,13 +1,21 @@
+v0.3.0:
+
+ * Let XRCWidget subclasses participate in two-phase initialisation
+ * this allows you to name an XRCWidget in a 'subclass' attribute of the
+ XRC file, and have it create automatically
+ * for this to work, it must be possible to call the widget's __init__
+ method without arguments; post-initialisation steps should be moved
+ to the new "on_create" method.
v0.2.1:
- * relicensed under the MIT License (I find it simpler than BSD)
- * don't require the module to be importable in setup.py
+ * Relicensed under the MIT License (I find it simpler than BSD)
+ * Don't require the module to be importable in setup.py
v0.2.0:
- * relicensed under the BSD License
- * dropped support for python < 2.4 and wxPython < 2.6
+ * Relicensed under the BSD License
+ * Dropped support for python < 2.4 and wxPython < 2.6
* "VERSION" and related constants are now "__version__" and friends
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index a216f05..22365f4 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,525 +1,520 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the MIT license
# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
__ver_major__ = 0
-__ver_minor__ = 2
-__ver_patch__ = 1
+__ver_minor__ = 3
+__ver_patch__ = 0
__ver_sub__ = ""
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
__ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
-# The following seems to work around a wxWidgets bug which is making
-# XRCApp segfault, simply by creating a PySimpleApp.
-#from wxPython import wx as wx2
-#_WorkAround_app = wx2.wxPySimpleApp(0)
-#del _WorkAround_app
-#del wx2
-
-
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
-class XRCWidget:
+
+class NotGiven:
+ """Sentinal to indicate that no value was given for an argument."""
+ pass
+
+
+class XRCWidget(object):
"""Mix-in class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
-
- def __init__(self,parent):
- # Attribute initialisation
+ def __init__(self,parent=NotGiven):
self._xmltree = None
-
- # XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
- self._loadXRCFile(self._xrcfile,parent)
+ pre = self._getPre()
+ if parent is NotGiven:
+ # Assume the caller is doing two-phase creation themselves.
+ self.PostCreate(pre)
+ self.Bind(wx.EVT_WINDOW_CREATE,self.on_create)
+ else:
+ # Delegate the two-phase create to the XRC loader
+ self._loadXRCFile(self._xrcfile,pre,parent)
+
+ def on_create(self,event=None):
if self._useMagicMethods:
self._connectEventMethods()
-
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
-
## Methods for dealing with XRC resource files
@classmethod
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
@staticmethod
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
-
- def _loadXRCFile(self,fileNm,parent):
+ def _loadXRCFile(self,fileNm,pre,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
- will be loaded into the current object using two-stage initialisation,
- abstracted by the object's '_getPre' and '_loadOn' methods.
+ will be loaded into the current object using two-stage initialisation.
+ <pre> must be the pre-initialised widget object to load into, and
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
- self._xrcres = xrc.XmlResource(fileNm)
- pre = self._getPre()
+ xrcres = xrc.XmlResource(fileNm)
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
- self._loadOn(self._xrcres,pre,parent,resName)
+ self._loadOn(xrcres,pre,parent,resName)
self.PostCreate(pre)
-
+ self.OnCreate()
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
-
- ##
## Methods for obtaining references to child widgets
- ##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
- raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
+ raise XRCWidgetsError("Child '%s' of unsupported type '%s'"%(cName,data.attrs["class"],))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
-
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
-
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
-class XRCPanel(wx.Panel,XRCWidget):
+class XRCPanel(XRCWidget,wx.Panel):
"""wx.Panel with XRCWidget behaviors."""
- def __init__(self,parent,id=-1,*args,**kwds):
+ def __init__(self,parent=NotGiven,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
-class XRCDialog(wx.Dialog,XRCWidget):
+class XRCDialog(XRCWidget,wx.Dialog):
"""wx.Dialog with XRCWidget behaviors."""
- def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
+ def __init__(self,parent=NotGiven,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
-class XRCFrame(wx.Frame,XRCWidget):
+class XRCFrame(XRCWidget,wx.Frame):
"""wx.Frame with XRCWidget behaviors."""
- def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
+ def __init__(self,parent=NotGiven,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
+
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
|
rfk/xrcwidgets
|
afdfa28627713db02429b8916bb18cf8f93374dd
|
remove deprecated references to "wxPython" module
|
diff --git a/examples/demo.py b/examples/demo.py
index fae4c87..97b3af1 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,50 +1,51 @@
-from wxPython import wx
+import wx
from XRCWidgets import XRCApp, XRCDialog
+
from demo_widgets import DemoPanel
# Simple frame to demonstrate the use of menus and toolbar.
# Also shows how on_content() can be used to place widgets at creation time.
class DemoApp(XRCApp):
def on_m_file_exit_activate(self,evt):
"""Close the application"""
self.Close()
def on_m_file_new_activate(self,evt):
"""Create a new DemoPanel in the display area."""
dsp = self.getChild("displayarea")
p = DemoPanel(dsp)
self.replaceInWindow(dsp,p)
def on_tb_new_activate(self):
self.on_m_file_new_activate(None)
def on_m_help_about_activate(self,evt):
"""Show the About dialog."""
dlg = AboutDemoDialog(self)
dlg.ShowModal()
dlg.Destroy()
def on_tb_about_activate(self):
self.on_m_help_about_activate(None)
def on_displayarea_content(self,ctrl):
"""Initialise display area to contain a DemoPanel."""
return DemoPanel(ctrl)
# About Dialog demonstrates how to explicitly set widget name
# Other properies such as filename (_xrcfilename) and file location
# (_xrcfile) can be set similarly
class AboutDemoDialog(XRCDialog):
_xrcname = "about"
# Instantiate and run the application
def run():
app = DemoApp()
app.MainLoop()
diff --git a/examples/menus.py b/examples/menus.py
index 75c711a..97fea12 100644
--- a/examples/menus.py
+++ b/examples/menus.py
@@ -1,26 +1,26 @@
-from wxPython import wx
+import wx
from XRCWidgets import XRCApp
class MenuApp(XRCApp):
def on_m_file_exit_activate(self,ctrl):
self.Close()
def on_m_file_new_doc_activate(self,evt):
print "NEW DOCUMENT"
def on_m_file_new_tmpl_activate(self,evt):
print "NEW TEMPLATE"
def on_m_help_about_activate(self,evt):
print "SHOWING ABOUT DIALOG..."
def run():
app = MenuApp()
app.MainLoop()
|
rfk/xrcwidgets
|
2a4663374afec9185ca6e888da8b7c825543e809
|
add .gitignore file
|
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e750946
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.pyc
+*~
+*.swp
+build/
+dist/
+MANIFEST
|
rfk/xrcwidgets
|
8cb7ecb2a6d921798415c2fd73af7f8595f32814
|
dont require importability of XRCWidgets from setup.py
|
diff --git a/ChangeLog.txt b/ChangeLog.txt
index fd7cc07..7c64b5e 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,7 +1,13 @@
+v0.2.1:
+
+ * relicensed under the MIT License (I find it simpler than BSD)
+ * don't require the module to be importable in setup.py
+
+
v0.2.0:
* relicensed under the BSD License
* dropped support for python < 2.4 and wxPython < 2.6
* "VERSION" and related constants are now "__version__" and friends
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 86734c9..a216f05 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,525 +1,525 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the MIT license
# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
__ver_major__ = 0
__ver_minor__ = 2
-__ver_patch__ = 0
+__ver_patch__ = 1
__ver_sub__ = ""
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
__ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
@classmethod
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
@staticmethod
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/setup.py b/setup.py
index fa4de35..a2d7478 100644
--- a/setup.py
+++ b/setup.py
@@ -1,45 +1,51 @@
#
# Copyright 2004-2009, Ryan Kelly
# Released under the terms of the MIT Licence.
# See the file 'LICENSE.txt' in the main distribution for details.
from distutils.core import setup
import os
-NAME = "XRCWidgets"
-from XRCWidgets import __version__ as VERSION
+XRCWidgets = {}
+try:
+ execfile("XRCWidgets/__init__.py",XRCWidgets)
+except ImportError:
+ pass
+
+NAME = "XRCWidgets"
+VERSION = XRCWidgets["__version__"]
DESCRIPTION = "Rapid GUI Development Framework using wxPython and XRC"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/XRCWidgets/"
LICENSE="MIT"
PACKAGES=['XRCWidgets']
DATA_FILES=[]
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
ext = eName.split(".")[-1]
if ext in (".py",".xrc",".bmp"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
license=LICENSE,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
2bdf7cb094b92c4605fcd63e16bfc6d225dbedc1
|
drop code for python < 2.4 and wxPython < 2.6
|
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 4214cb3..fd7cc07 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,7 @@
v0.2.0:
* relicensed under the BSD License
+ * dropped support for python < 2.4 and wxPython < 2.6
* "VERSION" and related constants are now "__version__" and friends
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 35c468b..86734c9 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,532 +1,525 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the MIT license
# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
__ver_major__ = 0
__ver_minor__ = 2
__ver_patch__ = 0
__ver_sub__ = ""
__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
__ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
- """Mix-in Class providing basic XRC behaviors.
+ """Mix-in class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
+
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
+ @classmethod
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
- _findXRCFile = classmethod(_findXRCFile)
-
+ @staticmethod
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
+
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
- _getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
- ## wxPython 2.5 introduces the PostCreate method to wrap some
- ## of ugliness. Check the wx version and implement this method
- ## for versions less than 2.5
- if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
- def PostCreate(self,pre):
- self.this = pre.this
- self._setOORInfo(self)
-
-
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
+
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
|
rfk/xrcwidgets
|
5dfa894f0e1d41109ba4af9bb32a2346cbafff97
|
switch to MIT license; plus some file cleanups
|
diff --git a/ChangeLog.txt b/ChangeLog.txt
new file mode 100644
index 0000000..4214cb3
--- /dev/null
+++ b/ChangeLog.txt
@@ -0,0 +1,6 @@
+
+
+v0.2.0:
+
+ * relicensed under the BSD License
+ * "VERSION" and related constants are now "__version__" and friends
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..9824852
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2009 Ryan Kelly
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/MANIFEST.in b/MANIFEST.in
index bd7e090..a7403ac 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,11 +1,13 @@
+include LICENSE.txt
+include README.txt
+include TODO.txt
+include ChangeLog.txt
+
include examples/*.py
include examples/*.xrc
include examples/*.bmp
-include docs/*.ps
-include docs/*.pdf
-recursive-include licence *
diff --git a/TODO b/TODO
deleted file mode 100644
index 32aad4c..0000000
--- a/TODO
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
- * Implement _getChild for more widget types:
- * toolbars
-
- * implement events for the current widget, perhaps using 'self'
-
diff --git a/TODO.txt b/TODO.txt
new file mode 100644
index 0000000..f16aba7
--- /dev/null
+++ b/TODO.txt
@@ -0,0 +1,5 @@
+
+ * implement events for the current widget, perhaps using 'self'
+ * Implement _getChild for more widget types:
+ * toolbars
+
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index a6a91a2..35c468b 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,530 +1,531 @@
# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
+# Released under the terms of the MIT license
+# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
-VER_MAJOR = 0
-VER_MINOR = 1
-VER_REL = 8
-VER_PATCH = ""
-VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
+__ver_major__ = 0
+__ver_minor__ = 2
+__ver_patch__ = 0
+__ver_sub__ = ""
+__version__ = "%d.%d.%d%s" % (__ver_major__,__ver_minor__,
+ __ver_patch__,__ver_sub__)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/XRCWidgets/utils.py b/XRCWidgets/utils.py
index 6e24fd4..9621b5e 100644
--- a/XRCWidgets/utils.py
+++ b/XRCWidgets/utils.py
@@ -1,149 +1,149 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
+# Copyright 2004-2009, Ryan Kelly
+# Released under the terms of the MIT Licence.
+# See the file 'LICENSE.txt' in the main distribution for details.
"""
XRCWidgets.utils: Misc utility classes for XRCWidgets framework
"""
##
## Implementation of callable-object currying via 'lcurry' and 'rcurry'
##
class _curry:
"""Currying Base Class.
A 'curry' can be thought of as a partially-applied function call.
Some of the function's arguments are supplied when the curry is created,
the rest when it is called. In between these two stages, the curry can
be treated just like a function.
"""
def __init__(self,func,*args,**kwds):
self.func = func
self.args = args[:]
self.kwds = kwds.copy()
class lcurry(_curry):
"""Left-curry class.
This curry places positional arguments given at creation time to the left
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = self.args + args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
class rcurry(_curry):
"""Right-curry class.
This curry places positional arguments given at creation time to the right
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = args + self.args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
##
-## Basic XML parsing for our own reading of the file
+## Basic XML parsing for our own reading of the XRC file
##
from xml.parsers import expat
class XMLNameError(Exception): pass
class XMLElementData:
"""Represents information about an element obtained from an XML file.
This class represents an XML element and as much information as needed
about from the containing XML file. The important attribues are:
* name: name of XML element
* attrs: dictionary of key/value pairs of element attributes
* parent: XMLElementData representing parent element
* children: list containing XMLElementData objects and/or strings
of the element's children
Instances of this class are not intended to be created directly. Rather,
they should be created using the <findElementData> function from this
module.
"""
def __init__(self):
self.name = None
self.attrs = {}
self.parent = None
self.children = []
class XMLDocTree:
"""Represents an XML document as a tree of XMLElementData objects.
This class provides the attribute 'root' which is the root XML
element, and the dictionary 'elements' which maps values of the XML
attribute "name" to the XMLElementData object for the corresponding
element.
"""
def __init__(self,xmlfile):
"""XMLDocTree initialiser.
A file-like object containing the XML data must be given.
"""
self.root = None
self._curElem = None
self.elements = {}
parser = expat.ParserCreate()
parser.StartElementHandler = self.onStart
parser.EndElementHandler = self.onEnd
parser.CharacterDataHandler = self.onCdata
parser.ParseFile(xmlfile)
def onStart(self,name,attrs):
data = XMLElementData()
data.name = name
data.attrs = attrs
data.parent = self._curElem
if self._curElem is not None:
self._curElem.children.append(data)
self._curElem = data
try:
nm = attrs["name"]
if self.elements.has_key(nm):
raise XMLNameError("Duplicate element name: '%s'" % (nm,))
self.elements[nm] = data
except KeyError:
pass
def onEnd(self,name):
if self._curElem.parent is not None:
self._curElem = self._curElem.parent
else:
self.root = self._curElem
self._curElem = None
def onCdata(self,cdata):
cdata = cdata.strip()
if cdata != "":
# Append CData to previous child if it was also CData
if len(self._curElem.children) == 0:
self._curElem.children.append(cdata)
else:
prevChild = self._curElem.children[-1]
if not isinstance(prevChild,XMLElementData):
self._curElem.children[-1] = "%s %s" % (prevChild,cdata)
else:
self._curElem.children.append(cdata)
diff --git a/licence/lgpl.txt b/licence/lgpl.txt
deleted file mode 100644
index d43cdf0..0000000
--- a/licence/lgpl.txt
+++ /dev/null
@@ -1,517 +0,0 @@
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- ==================================
- Version 2, June 1991
-
- Copyright (C) 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
- Preamble
-
-The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General
-Public Licenses are intended to guarantee your freedom to share
-and change free software--to make sure the software is free for
-all its users.
-
-This license, the Library General Public License, applies to
-some specially designated Free Software Foundation software, and
-to any other libraries whose authors decide to use it. You can
-use it for your libraries, too.
-
-When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure
-that you have the freedom to distribute copies of free software
-(and charge for this service if you wish), that you receive
-source code or can get it if you want it, that you can change
-the software or use pieces of it in new free programs; and that
-you know you can do these things.
-
-To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the
-rights. These restrictions translate to certain responsibilities
-for you if you distribute copies of the library, or if you
-modify it.
-
-For example, if you distribute copies of the library, whether
-gratis or for a fee, you must give the recipients all the rights
-that we gave you. You must make sure that they, too, receive or
-can get the source code. If you link a program with the
-library, you must provide complete object files to the
-recipients so that they can relink them with the library, after
-making changes to the library and recompiling it. And you must
-show them these terms so they know their rights.
-
-Our method of protecting your rights has two steps: (1)
-copyright the library, and (2) offer you this license which
-gives you legal permission to copy, distribute and/or modify the
-library.
-
-Also, for each distributor's protection, we want to make certain
-that everyone understands that there is no warranty for this
-free library. If the library is modified by someone else and
-passed on, we want its recipients to know that what they have is
-not the original version, so that any problems introduced by
-others will not reflect on the original authors' reputations.
-
-Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies
-distributing free software will individually obtain patent
-licenses, thus in effect transforming the program into
-proprietary software. To prevent this, we have made it clear
-that any patent must be licensed for everyone's free use or not
-licensed at all.
-
-Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License, which was designed for
-utility programs. This license, the GNU Library General Public
-License, applies to certain designated libraries. This license
-is quite different from the ordinary one; be sure to read it in
-full, and don't assume that anything in it is the same as in the
-ordinary license.
-
-The reason we have a separate public license for some libraries
-is that they blur the distinction we usually make between
-modifying or adding to a program and simply using it. Linking a
-program with a library, without changing the library, is in some
-sense simply using the library, and is analogous to running a
-utility program or application program. However, in a textual
-and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General
-Public License treats it as such.
-
-Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote
-software sharing, because most developers did not use the
-libraries. We concluded that weaker conditions might promote
-sharing better.
-
-However, unrestricted linking of non-free programs would deprive
-the users of those programs of all benefit from the free status
-of the libraries themselves. This Library General Public
-License is intended to permit developers of non-free programs to
-use free libraries, while preserving your freedom as a user of
-such programs to change the free libraries that are incorporated
-in them. (We have not seen how to achieve this as regards
-changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is
-that this will lead to faster development of free libraries.
-
-The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference
-between a "work based on the library" and a "work that uses the
-library". The former contains code derived from the library,
-while the latter only works together with the library.
-
-Note that it is possible for a library to be covered by the
-ordinary General Public License rather than by this special one.
-
- GNU LIBRARY GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other
-authorized party saying it may be distributed under the terms of
-this Library General Public License (also called "this
-License"). Each licensee is addressed as "you".
-
-A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application
-programs (which use some of those functions and data) to form
-executables.
-
-The "Library", below, refers to any such software library or
-work which has been distributed under these terms. A "work
-based on the Library" means either the Library or any derivative
-work under copyright law: that is to say, a work containing the
-Library or a portion of it, either verbatim or with
-modifications and/or translated straightforwardly into another
-language. (Hereinafter, translation is included without
-limitation in the term "modification".)
-
-"Source code" for a work means the preferred form of the work
-for making modifications to it. For a library, complete source
-code means all the source code for all modules it contains, plus
-any associated interface definition files, plus the scripts used
-to control compilation and installation of the library.
-
-Activities other than copying, distribution and modification are
-not covered by this License; they are outside its scope. The
-act of running a program using the Library is not restricted,
-and output from such a program is covered only if its contents
-constitute a work based on the Library (independent of the use
-of the Library in a tool for writing it). Whether that is true
-depends on what the Library does and what the program that uses
-the Library does.
-
-1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided
-that you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep
-intact all the notices that refer to this License and to the
-absence of any warranty; and distribute a copy of this License
-along with the Library.
-
-You may charge a fee for the physical act of transferring a
-copy, and you may at your option offer warranty protection in
-exchange for a fee.
-
-2. You may modify your copy or copies of the Library or any
-portion of it, thus forming a work based on the Library, and
-copy and distribute such modifications or work under the terms
-of Section 1 above, provided that you also meet all of these
-conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the
-Library, and can be reasonably considered independent and
-separate works in themselves, then this License, and its terms,
-do not apply to those sections when you distribute them as
-separate works. But when you distribute the same sections as
-part of a whole which is a work based on the Library, the
-distribution of the whole must be on the terms of this License,
-whose permissions for other licensees extend to the entire
-whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or
-contest your rights to work written entirely by you; rather, the
-intent is to exercise the right to control the distribution of
-derivative or collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the
-Library with the Library (or with a work based on the Library)
-on a volume of a storage or distribution medium does not bring
-the other work under the scope of this License.
-
-3. You may opt to apply the terms of the ordinary GNU General
-Public License instead of this License to a given copy of the
-Library. To do this, you must alter all the notices that refer
-to this License, so that they refer to the ordinary GNU General
-Public License, version 2, instead of to this License. (If a
-newer version than version 2 of the ordinary GNU General Public
-License has appeared, then you can specify that version instead
-if you wish.) Do not make any other change in these notices.
-
-Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to
-all subsequent copies and derivative works made from that copy.
-
-This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable
-form under the terms of Sections 1 and 2 above provided that you
-accompany it with the complete corresponding machine-readable
-source code, which must be distributed under the terms of
-Sections 1 and 2 above on a medium customarily used for software
-interchange.
-
-If distribution of object code is made by offering access to
-copy from a designated place, then offering equivalent access to
-copy the source code from the same place satisfies the
-requirement to distribute the source code, even though third
-parties are not compelled to copy the source along with the
-object code.
-
-5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being
-compiled or linked with it, is called a "work that uses the
-Library". Such a work, in isolation, is not a derivative work
-of the Library, and therefore falls outside the scope of this
-License.
-
-However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library
-(because it contains portions of the Library), rather than a
-"work that uses the library". The executable is therefore
-covered by this License. Section 6 states terms for distribution
-of such executables.
-
-When a "work that uses the Library" uses material from a header
-file that is part of the Library, the object code for the work
-may be a derivative work of the Library even though the source
-code is not. Whether this is true is especially significant if
-the work can be linked without the Library, or if the work is
-itself a library. The threshold for this to be true is not
-precisely defined by law.
-
-If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small
-inline functions (ten lines or less in length), then the use of
-the object file is unrestricted, regardless of whether it is
-legally a derivative work. (Executables containing this object
-code plus portions of the Library will still fall under Section
-6.)
-
-Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of
-Section 6. Any executables containing that work also fall under
-Section 6, whether or not they are linked directly with the
-Library itself.
-
-6. As an exception to the Sections above, you may also compile
-or link a "work that uses the Library" with the Library to
-produce a work containing portions of the Library, and
-distribute that work under terms of your choice, provided that
-the terms permit modification of the work for the customer's own
-use and reverse engineering for debugging such modifications.
-
-You must give prominent notice with each copy of the work that
-the Library is used in it and that the Library and its use are
-covered by this License. You must supply a copy of this
-License. If the work during execution displays copyright
-notices, you must include the copyright notice for the Library
-among them, as well as a reference directing the user to the
-copy of this License. Also, you must do one of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
-For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special
-exception, the source code distributed need not include anything
-that is normally distributed (in either source or binary form)
-with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that
-component itself accompanies the executable.
-
-It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you
-cannot use both them and the Library together in an executable
-that you distribute.
-
-7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other
-library facilities not covered by this License, and distribute
-such a combined library, provided that the separate distribution
-of the work based on the Library and of the other library
-facilities is otherwise permitted, and provided that you do
-these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
-8. You may not copy, modify, sublicense, link with, or
-distribute the Library except as expressly provided under this
-License. Any attempt otherwise to copy, modify, sublicense,
-link with, or distribute the Library is void, and will
-automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you
-under this License will not have their licenses terminated so
-long as such parties remain in full compliance.
-
-9. You are not required to accept this License, since you have
-not signed it. However, nothing else grants you permission to
-modify or distribute the Library or its derivative works. These
-actions are prohibited by law if you do not accept this
-License. Therefore, by modifying or distributing the Library
-(or any work based on the Library), you indicate your acceptance
-of this License to do so, and all its terms and conditions for
-copying, distributing or modifying the Library or works based on
-it.
-
-10. Each time you redistribute the Library (or any work based on
-the Library), the recipient automatically receives a license
-from the original licensor to copy, distribute, link with or
-modify the Library subject to these terms and conditions. You
-may not impose any further restrictions on the recipients'
-exercise of the rights granted herein. You are not responsible
-for enforcing compliance by third parties to this License.
-
-11. If, as a consequence of a court judgment or allegation of
-patent infringement or for any other reason (not limited to
-patent issues), conditions are imposed on you (whether by court
-order, agreement or otherwise) that contradict the conditions of
-this License, they do not excuse you from the conditions of this
-License. If you cannot distribute so as to satisfy
-simultaneously your obligations under this License and any other
-pertinent obligations, then as a consequence you may not
-distribute the Library at all. For example, if a patent license
-would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you,
-then the only way you could satisfy both it and this License
-would be to refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable
-under any particular circumstance, the balance of the section is
-intended to apply, and the section as a whole is intended to
-apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe
-any patents or other property right claims or to contest
-validity of any such claims; this section has the sole purpose
-of protecting the integrity of the free software distribution
-system which is implemented by public license practices. Many
-people have made generous contributions to the wide range of
-software distributed through that system in reliance on
-consistent application of that system; it is up to the
-author/donor to decide if he or she is willing to distribute
-software through any other system and a licensee cannot impose
-that choice.
-
-This section is intended to make thoroughly clear what is
-believed to be a consequence of the rest of this License.
-
-12. If the distribution and/or use of the Library is restricted
-in certain countries either by patents or by copyrighted
-interfaces, the original copyright holder who places the Library
-under this License may add an explicit geographical distribution
-limitation excluding those countries, so that distribution is
-permitted only in or among countries not thus excluded. In such
-case, this License incorporates the limitation as if written in
-the body of this License.
-
-13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to
-time. Such new versions will be similar in spirit to the present
-version, but may differ in detail to address new problems or
-concerns.
-
-Each version is given a distinguishing version number. If the
-Library specifies a version number of this License which applies
-to it and "any later version", you have the option of following
-the terms and conditions either of that version or of any later
-version published by the Free Software Foundation. If the
-Library does not specify a license version number, you may
-choose any version ever published by the Free Software
-Foundation.
-
-14. If you wish to incorporate parts of the Library into other
-free programs whose distribution conditions are incompatible
-with these, write to the author to ask for permission. For
-software which is copyrighted by the Free Software Foundation,
-write to the Free Software Foundation; we sometimes make
-exceptions for this. Our decision will be guided by the two
-goals of preserving the free status of all derivatives of our
-free software and of promoting the sharing and reuse of software
-generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND,
-EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
-DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Libraries
-
-If you develop a new library, and you want it to be of the
-greatest possible use to the public, we recommend making it free
-software that everyone can redistribute and change. You can do
-so by permitting redistribution under these terms (or,
-alternatively, under the terms of the ordinary General Public
-License).
-
-To apply these terms, attach the following notices to the
-library. It is safest to attach them to the start of each
-source file to most effectively convey the exclusion of
-warranty; and each file should have at least the "copyright"
-line and a pointer to where the full notice is found.
-
- <one line to give the library's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- <signature of Ty Coon>, 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
diff --git a/licence/licence.txt b/licence/licence.txt
deleted file mode 100644
index c91deed..0000000
--- a/licence/licence.txt
+++ /dev/null
@@ -1,53 +0,0 @@
- wxWindows Library Licence, Version 3
- ====================================
-
- Copyright (c) 1998 Julian Smart, Robert Roebling et al
-
- Everyone is permitted to copy and distribute verbatim copies
- of this licence document, but changing it is not allowed.
-
- WXWINDOWS LIBRARY LICENCE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public Licence as published by
- the Free Software Foundation; either version 2 of the Licence, or (at
- your option) any later version.
-
- This library is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
- General Public Licence for more details.
-
- You should have received a copy of the GNU Library General Public Licence
- along with this software, usually in a file named COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307 USA.
-
- EXCEPTION NOTICE
-
- 1. As a special exception, the copyright holders of this library give
- permission for additional uses of the text contained in this release of
- the library as licenced under the wxWindows Library Licence, applying
- either version 3 of the Licence, or (at your option) any later version of
- the Licence as published by the copyright holders of version 3 of the
- Licence document.
-
- 2. The exception is that you may use, copy, link, modify and distribute
- under the user's own terms, binary object code versions of works based
- on the Library.
-
- 3. If you copy code from files distributed under the terms of the GNU
- General Public Licence or the GNU Library General Public Licence into a
- copy of this library, as this licence permits, the exception does not
- apply to the code that you add in this way. To avoid misleading anyone as
- to the status of such modified files, you must delete this exception
- notice from such code and/or adjust the licensing conditions notice
- accordingly.
-
- 4. If you write modifications of your own for this library, it is your
- choice whether to permit this exception to apply to your modifications.
- If you do not wish that, you must delete the exception notice from such
- code and/or adjust the licensing conditions notice accordingly.
-
-
diff --git a/licence/licendoc.txt b/licence/licendoc.txt
deleted file mode 100644
index 5bfa143..0000000
--- a/licence/licendoc.txt
+++ /dev/null
@@ -1,60 +0,0 @@
- wxWindows Free Documentation Licence, Version 3
- ===============================================
-
- Copyright (c) 1998 Julian Smart, Robert Roebling et al
-
- Everyone is permitted to copy and distribute verbatim copies
- of this licence document, but changing it is not allowed.
-
- WXWINDOWS FREE DOCUMENTATION LICENCE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 1. Permission is granted to make and distribute verbatim copies of this
- manual or piece of documentation provided any copyright notice and this
- permission notice are preserved on all copies.
-
- 2. Permission is granted to process this file or document through a
- document processing system and, at your option and the option of any third
- party, print the results, provided a printed document carries a copying
- permission notice identical to this one.
-
- 3. Permission is granted to copy and distribute modified versions of this
- manual or piece of documentation under the conditions for verbatim
- copying, provided also that any sections describing licensing conditions
- for this manual, such as, in particular, the GNU General Public Licence,
- the GNU Library General Public Licence, and any wxWindows Licence are
- included exactly as in the original, and provided that the entire
- resulting derived work is distributed under the terms of a permission
- notice identical to this one.
-
- 4. Permission is granted to copy and distribute translations of this
- manual or piece of documentation into another language, under the above
- conditions for modified versions, except that sections related to
- licensing, including this paragraph, may also be included in translations
- approved by the copyright holders of the respective licence documents in
- addition to the original English.
-
- WARRANTY DISCLAIMER
-
- 5. BECAUSE THIS MANUAL OR PIECE OF DOCUMENTATION IS LICENSED FREE OF CHARGE,
- THERE IS NO WARRANTY FOR IT, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
- EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
- PARTIES PROVIDE THIS MANUAL OR PIECE OF DOCUMENTATION "AS IS" WITHOUT
- WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
- THE MANUAL OR PIECE OF DOCUMENTATION IS WITH YOU. SHOULD THE MANUAL OR
- PIECE OF DOCUMENTATION PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
- NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 6. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
- ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- REDISTRIBUTE THE MANUAL OR PIECE OF DOCUMENTATION AS PERMITTED ABOVE, BE
- LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
- CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
- MANUAL OR PIECE OF DOCUMENTATION (INCLUDING BUT NOT LIMITED TO LOSS OF
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
- PARTIES OR A FAILURE OF A PROGRAM BASED ON THE MANUAL OR PIECE OF
- DOCUMENTATION TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
- OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
diff --git a/licence/preamble.txt b/licence/preamble.txt
deleted file mode 100644
index f2f1643..0000000
--- a/licence/preamble.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-Preamble
-========
-
-The licensing of the wxWindows library is intended to protect the wxWindows
-library, its developers, and its users, so that the considerable investment
-it represents is not abused.
-
-Under the terms of the wxWindows Licence, you as a user are not
-obliged to distribute wxWindows source code with your products, if you
-distribute these products in binary form. However, you are prevented from
-restricting use of the library in source code form, or denying others the
-rights to use or distribute wxWindows library source code in the way
-intended.
-
-The wxWindows Licence establishes the copyright for the code and related
-material, and it gives you legal permission to copy, distribute and/or
-modify the library. It also asserts that no warranty is given by the authors
-for this or derived code.
-
-The core distribution of the wxWindows library contains files
-under two different licences:
-
-- Most files are distributed under the GNU Library General Public
- Licence, version 2, with the special exception that you may create and
- distribute object code versions built from the source code or modified
- versions of it (even if these modified versions include code under a
- different licence), and distribute such binaries under your own
- terms.
-
-- Most core wxWindows manuals are made available under the "wxWindows
- Free Documentation Licence", which allows you to distribute modified
- versions of the manuals, such as versions documenting any modifications
- made by you in your version of the library. However, you may not restrict
- any third party from reincorporating your changes into the original
- manuals.
-
-Other relevant files:
-
-- licence.txt: a statement that the wxWindows library is
- covered by the GNU Library General Public Licence, with an
- exception notice for binary distribution.
-
-- licendoc.txt: the wxWindows Documentation Licence.
-
-- lgpl.txt: the text of the GNU Library General Public Licence.
-
-- gpl.txt: the text of the GNU General Public Licence, which is
- referenced by the LGPL.
-
diff --git a/setup.py b/setup.py
index 9111257..fa4de35 100644
--- a/setup.py
+++ b/setup.py
@@ -1,52 +1,45 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
-
-
-#
-# Distutils Setup Script for XRCWidgets
#
+# Copyright 2004-2009, Ryan Kelly
+# Released under the terms of the MIT Licence.
+# See the file 'LICENSE.txt' in the main distribution for details.
+
from distutils.core import setup
import os
NAME = "XRCWidgets"
-from XRCWidgets import VERSION
+from XRCWidgets import __version__ as VERSION
DESCRIPTION = "Rapid GUI Development Framework using wxPython and XRC"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
-URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
+URL="http://www.rfk.id.au/software/XRCWidgets/"
+LICENSE="MIT"
PACKAGES=['XRCWidgets']
-DATA_FILES=[('share/XRCWidgets/docs',
- ['docs/manual.pdf',
- 'docs/manual.ps']),
- ('share/XRCWidgets/docs/licence',
- ['licence/lgpl.txt',
- 'licence/licence.txt',
- 'licence/licendoc.txt',
- 'licence/preamble.txt']),
- ]
+DATA_FILES=[]
+
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
- if eName.endswith(".py") or eName.endswith(".xrc"):
+ ext = eName.split(".")[-1]
+ if ext in (".py",".xrc",".bmp"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
+ license=LICENSE,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
61f33882c991233d0be49ff4a3177ae9979547e4
|
added README file
|
diff --git a/README.txt b/README.txt
index e69de29..d0bd699 100644
--- a/README.txt
+++ b/README.txt
@@ -0,0 +1,7 @@
+
+ XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
+
+XRC is a wxWidgets standard for describing a GUI in an XML file. This module
+provides facilities to easily incorporate GUI components ('widgets') whose
+layout is defined in such a file.
+
|
rfk/xrcwidgets
|
5dc9375d99c5589a551d7c216009423642f74803
|
git-svn-id: file:///storage/svnroot/software/XRCWidgets/tags/rel_0_1_8@52 5b905b9f-cef6-0310-8904-a74f1b98bbbd
|
diff --git a/MANIFEST.in b/MANIFEST.in
index 03c2c86..bd7e090 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,12 +1,11 @@
include examples/*.py
include examples/*.xrc
include examples/*.bmp
include docs/*.ps
include docs/*.pdf
-recursive-include tools *
recursive-include licence *
diff --git a/tools/XRCWidgets-0.1.4.ebuild b/tools/XRCWidgets-0.1.4.ebuild
deleted file mode 100644
index 1b9f8cd..0000000
--- a/tools/XRCWidgets-0.1.4.ebuild
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
-
-inherit distutils
-
-DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
-SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_4/XRCWidgets-0.1.4.tar.gz"
-HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
-
-IUSE=""
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-LICENSE="wxWinLL-3"
-
-DEPEND=">=dev-lang/python-2.3
- >=dev-python/wxpython-2.4.2.4"
-
-src_install() {
- distutils_src_install
-}
-
-
diff --git a/tools/XRCWidgets-0.1.5.ebuild b/tools/XRCWidgets-0.1.5.ebuild
deleted file mode 100644
index 2154d21..0000000
--- a/tools/XRCWidgets-0.1.5.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
-
-inherit distutils
-
-DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
-SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_5/XRCWidgets-0.1.5.tar.gz"
-HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
-
-IUSE=""
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-LICENSE="wxWinLL-3"
-
-RESTRICT="nomirror"
-
-DEPEND=">=dev-lang/python-2.3
- >=dev-python/wxpython-2.4.2.4"
-
-src_install() {
- distutils_src_install
-}
-
-
diff --git a/tools/XRCWidgets-0.1.6.ebuild b/tools/XRCWidgets-0.1.6.ebuild
deleted file mode 100644
index c57073f..0000000
--- a/tools/XRCWidgets-0.1.6.ebuild
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
-
-inherit distutils
-
-DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
-SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_5/XRCWidgets-0.1.5.tar.gz"
-HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
-
-IUSE=""
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-LICENSE="wxWinLL-3"
-
-RESTRICT="nomirror"
-
-DEPEND=">=dev-lang/python-2.3
- >=dev-python/wxpython-2.6"
-
-src_install() {
- distutils_src_install
-}
-
-
|
rfk/xrcwidgets
|
2a4e97c76dd17880a1af00d011e7f2e7d9811b30
|
git-svn-id: file:///storage/svnroot/software/XRCWidgets/tags/rel_0_1_8@51 5b905b9f-cef6-0310-8904-a74f1b98bbbd
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 9daf023..a6a91a2 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,528 +1,528 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
VER_MAJOR = 0
VER_MINOR = 1
-VER_REL = 7
+VER_REL = 8
VER_PATCH = ""
VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/setup.py b/setup.py
index d7f6d4f..9111257 100644
--- a/setup.py
+++ b/setup.py
@@ -1,52 +1,52 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
import os
NAME = "XRCWidgets"
from XRCWidgets import VERSION
-DESCRIPTION = "XRCWidgets GUI Development Framework"
+DESCRIPTION = "Rapid GUI Development Framework using wxPython and XRC"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
if eName.endswith(".py") or eName.endswith(".xrc"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
bf231123d302dc593f4ff49b53ab0f19b1731d1a
|
git-svn-id: file:///storage/svnroot/software/XRCWidgets/trunk@49 5b905b9f-cef6-0310-8904-a74f1b98bbbd
|
diff --git a/examples/simple.py b/examples/simple.py
index 19783be..f90f2e2 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -1,20 +1,19 @@
-from wxPython import wx
from XRCWidgets import XRCApp
class SimpleApp(XRCApp):
def on_message_change(self,msg):
print "MESSAGE IS NOW:", msg.GetValue()
def on_ok_activate(self,bttn):
print self.getChild("message").GetValue()
def run():
app = SimpleApp()
app.MainLoop()
|
rfk/xrcwidgets
|
4847d4f95abdecb1adfebdd4f61027091735c4e1
|
git-svn-id: file:///storage/svnroot/software/XRCWidgets/trunk@48 5b905b9f-cef6-0310-8904-a74f1b98bbbd
|
diff --git a/MANIFEST.in b/MANIFEST.in
index f873ee3..03c2c86 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,11 +1,12 @@
include examples/*.py
include examples/*.xrc
+include examples/*.bmp
include docs/*.ps
include docs/*.pdf
recursive-include tools *
recursive-include licence *
|
rfk/xrcwidgets
|
8272835e336814fa2704e7ab02ed419305199c91
|
git-svn-id: file:///storage/svnroot/software/XRCWidgets/trunk@47 5b905b9f-cef6-0310-8904-a74f1b98bbbd
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 5ecf962..9daf023 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,528 +1,528 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
VER_MAJOR = 0
VER_MINOR = 1
-VER_REL = 6
+VER_REL = 7
VER_PATCH = ""
VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/XRCWidgets/connectors.py b/XRCWidgets/connectors.py
index 9c6bde9..a80f1e6 100644
--- a/XRCWidgets/connectors.py
+++ b/XRCWidgets/connectors.py
@@ -1,205 +1,220 @@
"""
XRCWidgets.connectors: Classes to connect events for XRCWidgets
This module provides subclasses of Connector, which are responsible
for hooking up event listeners for a particular type of action
within the XRCWidgets framework. These are key to the "Magic Methods"
functionality of XRCWidgets.
For example, the method named:
on_mytextbox_change()
Is connected using the ChangeConnector() class. The class for a
given event action can be determined by inspecting the dictionary
returned by the function getConnectors().
"""
import wx
from XRCWidgets.utils import lcurry
class Connector:
"""Class responsible for connecting events within XRCWidgets
Subclasses of this abstract base class provide the method
connect() which will produce the necessary connection
based on the named child type.
"""
# Internally, the connections are managed by a dictionary of
# methods, one per child type. The entries are listed on
# the class
_cons_entries = ()
def __init__(self):
self._cons = {}
for entry in self._cons_entries:
self._cons[entry] = getattr(self,"connect_"+entry)
def connect(self,cName,parent,handler):
"""Connect <handler> to the named child of the given parent.
This method must return True if the connection succeeded,
False otherwise.
"""
cType = parent.getChildType(cName)
if self._cons.has_key(cType):
return self._cons[cType](cName,parent,handler)
return False
class ChangeConnector(Connector):
"""Connector for the "change" event.
This event is activated when the value of a control changes
due to user input. The handler should expect a reference
to the control itself as its only argument.
"""
_cons_entries = ("wxTextCtrl","wxCheckBox","wxListBox",
- "wxComboBox","wxRadioBox","wxChoice")
+ "wxComboBox","wxRadioBox","wxChoice",
+ "wxSlider")
def connect_wxTextCtrl(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(parent,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
return True
def connect_wxCheckBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(parent,parent.getChildId(cName),handler)
return True
def connect_wxListBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(parent,parent.getChildId(cName),handler)
return True
def connect_wxComboBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(parent,parent.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(parent,parent.getChildId(cName),handler)
return True
def connect_wxRadioBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(parent,parent.getChildId(cName),handler)
return True
def connect_wxChoice(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(parent,parent.getChildId(cName),handler)
return True
+
+ def connect_wxSlider(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ child.Bind(wx.EVT_SCROLL,handler)
+ return True
class ContentConnector(Connector):
"""Connector handling the 'content' event.
This is a sort of pseudo-event that is only triggered
once, at widget creation time. It is used to programatically
create the child content of a particular widget. The
event handler must expect the named child widget as its
only argument, and return the newly created content for that
child widget.
"""
def connect(self,cName,parent,handler):
child = parent.getChild(cName)
widget = handler(child)
parent.replaceInWindow(child,widget)
return True
class ActivateConnector(Connector):
"""Connector handling the 'activate' event.
This event is fired when a control, such as a button, is
activated by the user - similar to a 'click' event.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
- _cons_entries = ("wxButton","wxCheckBox","wxMenuItem",
- "tool","wxListBox")
+ _cons_entries = ("wxButton","wxBitmapButton","wxCheckBox",
+ "wxMenuItem", "tool","wxListBox")
def connect_wxButton(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(parent,child.GetId(),handler)
return True
+ def connect_wxBitmapButton(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_BUTTON(parent,child.GetId(),handler)
+ return True
+
def connect_wxCheckBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(parent,child.GetId(),handler)
return True
def connect_wxMenuItem(self,cName,parent,handler):
handler = lcurry(_EvtHandleWithEvt,handler)
cID = parent.getChildId(cName)
wx.EVT_MENU(parent,cID,handler)
return True
def connect_tool(self,cName,parent,handler):
handler = lcurry(_EvtHandleWithEvt,handler)
wx.EVT_MENU(parent,parent.getChildId(cName),handler)
return True
def connect_wxListBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(parent,parent.getChildId(cName),handler)
return True
def getConnectors():
"""Construct and return dictionary of connectors."""
cons = {}
cons["change"] = ChangeConnector()
cons["content"] = ContentConnector()
cons["activate"] = ActivateConnector()
return cons
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleWithEvt(toCall,evnt):
"""Handle an event by invoking <toCall> with the event as argument.
"""
toCall(evnt)
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
|
rfk/xrcwidgets
|
508499d0d5ca39e4b8b082af876e592ec91d494c
|
Final preprs for 0.1.6 release
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 97e8b3f..5ecf962 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,528 +1,528 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
VER_MAJOR = 0
VER_MINOR = 1
-VER_REL = 5
+VER_REL = 6
VER_PATCH = ""
VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/docs/manual.lyx b/docs/manual.lyx
index cff69f6..f878a13 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,528 +1,643 @@
-#LyX 1.3 created this file. For more info see http://www.lyx.org/
-\lyxformat 221
+#LyX 1.4.1 created this file. For more info see http://www.lyx.org/
+\lyxformat 245
+\begin_document
+\begin_header
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
-\spacing single
-\papersize Default
-\paperpackage a4
-\use_geometry 1
-\use_amsmath 0
-\use_natbib 0
-\use_numerical_citations 0
+\spacing single
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\cite_engine basic
+\use_bibtopic false
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
-\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
+\tracking_changes false
+\output_changes true
+\end_header
-\layout Title
+\begin_body
+\begin_layout Title
The XRCWidgets Package
-\layout Author
+\end_layout
+\begin_layout Author
Ryan Kelly ([email protected])
-\layout Standard
+\end_layout
-This document is Copyright 2004, Ryan Kelly.
+\begin_layout Standard
+This document is Copyright 2004-06, Ryan Kelly.
Verbatim copies may be made and distributed without restriction.
-\layout Section
+\end_layout
+\begin_layout Section
Introduction
-\layout Standard
+\end_layout
+\begin_layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
Underlying Technologies
-\layout Itemize
+\end_layout
+\begin_layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
-\newline
+\newline
http://www.wxwidgets.org/
-\layout Itemize
+\end_layout
+\begin_layout Itemize
wxPython is a wxWidgets binding for the Python language
-\newline
+\newline
http://www.wxPython.org
-\layout Itemize
+\end_layout
+\begin_layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
-\newline
+\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
-\layout Subsection
+\end_layout
+\begin_layout Subsection
Purpose
-\layout Standard
+\end_layout
+\begin_layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
-\layout Standard
+\end_layout
+\begin_layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
XRCWidgets, and if final versions require greater efficiency than the toolkit
can provide it is a simple matter to convert the XRC files into Python
or C++ code.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
Advantages
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Rapid GUI Development
-\layout Standard
+\end_layout
+\begin_layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
the rest of the application.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Declarative Event Handling
-\layout Standard
+\end_layout
+\begin_layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Separation of Layout from Code
-\layout Standard
+\end_layout
+\begin_layout Standard
Rapid GUI development is also possible using design applications that directly
output Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
n and almost impossible to reverse-engineer the code for further editing.
-\layout Standard
+\end_layout
+\begin_layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Easy Conversion to Native Code
-\layout Standard
+\end_layout
+\begin_layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Compatibility with Standard wxPython Code
-\layout Standard
+\end_layout
+\begin_layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
collection of child widgets created and event handlers connected as it
is initialised.
-\layout Standard
+\end_layout
+\begin_layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Simple Re-sizing of GUI
-\layout Standard
+\end_layout
+\begin_layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
-\layout Section
+\end_layout
+\begin_layout Section
Classes Provided
-\layout Standard
+\end_layout
+\begin_layout Standard
The classes provided by the XRCWidgets framework are detailed below.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
XRCWidgetsError
-\layout Standard
+\end_layout
+\begin_layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
XRCWidget
-\layout Standard
+\end_layout
+\begin_layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
-\layout Itemize
+\end_layout
+\begin_layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
-\layout Itemize
+\end_layout
+\begin_layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
-\layout Itemize
+\end_layout
+\begin_layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
-\layout Itemize
+\end_layout
+\begin_layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
-\layout Standard
+\end_layout
+\begin_layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
-\end_inset
+\end_inset
on_<child>_<action>
\begin_inset Quotes erd
-\end_inset
+\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
-\layout Standard
+\end_layout
+\begin_layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
-\layout Itemize
+\end_layout
+\begin_layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
-\layout Itemize
+\end_layout
+\begin_layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
-\layout Itemize
+\end_layout
+\begin_layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
-\end_inset
+\end_inset
replaceInChild
\begin_inset Quotes erd
-\end_inset
+\end_inset
in the constructor
-\layout Subsection
+\end_layout
+\begin_layout Subsection
XRCPanel
-\layout Standard
+\end_layout
+\begin_layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
XRCDialog
-\layout Standard
+\end_layout
+\begin_layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
XRCFrame
-\layout Standard
+\end_layout
+\begin_layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
XRCApp
-\layout Standard
+\end_layout
+\begin_layout Standard
XRCApp inherits from XRCFrame and is designed to provide a shortcut for
specifying the main frame of an application.
It provides the methods
\begin_inset Quotes eld
-\end_inset
+\end_inset
MainLoop
\begin_inset Quotes erd
-\end_inset
+\end_inset
and
\begin_inset Quotes eld
-\end_inset
+\end_inset
EndMainLoop
\begin_inset Quotes erd
-\end_inset
+\end_inset
mirroring those of the wxApp class.
When created, it creates a private wxApp class and makes itself the top-level
window for the application.
-\layout Section
+\end_layout
+\begin_layout Section
Tutorials
-\layout Standard
+\end_layout
+\begin_layout Standard
The following are a number of quick tutorials to get you started using the
framework.
The code for these tutorials can be found in the 'examles' directory of
the source distribution.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
The Basics
-\layout Standard
+\end_layout
+\begin_layout Standard
This section provides a quick tutorial for creating an appliction using
the XRCWidgets framework.
The application will consist of a single widget called 'SimpleApp', and
will live in the file 'simple.py'.
It will consist of a wxFrame with a text-box and a button, which prints
a message to the terminal when the button is clicked.
The frame will look something like this:
-\layout Standard
-\added_space_top smallskip \added_space_bottom smallskip \align center
+\end_layout
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
-\end_inset
+\end_inset
+
+\end_layout
-\layout Standard
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+\end_layout
+
+\begin_layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Creating the XRC File
-\layout Standard
+\end_layout
+\begin_layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
-\layout Standard
+\end_layout
+\begin_layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
-\layout Standard
+\end_layout
+\begin_layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
-\end_inset
+\end_inset
Add a Frame
\begin_inset Quotes erd
-\end_inset
+\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
-\end_inset
+\end_inset
SimpleApp
\begin_inset Quotes erd
-\end_inset
+\end_inset
- this is to correspond to the name of the class that is to be created.
-\layout Standard
+\end_layout
+\begin_layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
-\end_inset
+\end_inset
message
\begin_inset Quotes erd
-\end_inset
+\end_inset
and a button named
\begin_inset Quotes eld
-\end_inset
+\end_inset
ok
\begin_inset Quotes erd
-\end_inset
+\end_inset
.
-\layout Standard
+\end_layout
+\begin_layout Standard
When the frame is finished, selecte Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
-\end_inset
+\end_inset
xrc2wxg
\begin_inset Quotes erd
-\end_inset
+\end_inset
which can convert from the XRC file to a wxGlade project file.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Creating the Python Code
-\layout Standard
+\end_layout
+\begin_layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
-\layout Standard
+\end_layout
+\begin_layout Standard
Next, create the python file 'simple.py' using the following code:
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
from XRCWidgets import XRCApp
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
class SimpleApp(XRCApp):
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
def on_message_change(self,msg):
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
print
\begin_inset Quotes eld
-\end_inset
+\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
-\end_inset
+\end_inset
, msg.GetValue()
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
def on_ok_activate(self,bttn):
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
-\end_inset
+\end_inset
message
\begin_inset Quotes erd
-\end_inset
+\end_inset
).GetValue()
-\layout Standard
+\end_layout
+\begin_layout Standard
This code is all that is required to make a functioning application.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
-\end_inset
+\end_inset
on_<child>_<action>
\begin_inset Quotes erd
-\end_inset
+\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
-\end_inset
+\end_inset
on_message_change
\begin_inset Quotes erd
-\end_inset
+\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
-\end_inset
+\end_inset
on_ok_activate
\begin_inset Quotes erd
-\end_inset
+\end_inset
will be called whenever the button is clicked.
-\layout Subsubsection
+\end_layout
+\begin_layout Subsubsection
Testing the Widget
-\layout Standard
+\end_layout
+\begin_layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
from simple import SimpleApp
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
app = SimpleApp()
-\layout LyX-Code
+\end_layout
+\begin_layout LyX-Code
app.MainLoop()
-\layout Standard
+\end_layout
+\begin_layout Standard
This code imports the widget's definition, creates the application and runs
the event loop.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
-\layout Subsection
+\end_layout
+\begin_layout Subsection
A more complicated Frame
-\layout Standard
+\end_layout
+\begin_layout Standard
This tutorial is yet to be completed.
See the files 'menus.py' and menus.xrc' in the examples directory.
-\layout Standard
+\end_layout
+\begin_layout Standard
Quick Guide:
-\layout Itemize
+\end_layout
+\begin_layout Itemize
Create a frame as usual, and select the 'Has MenuBar' option in its properties.
Do *not* create a seperate MenuBar, this wont work.
-\layout Itemize
+\end_layout
+\begin_layout Itemize
Edit the menus of the MenuBar to your liking.
Ensure that you fill in the
\begin_inset Quotes eld
-\end_inset
+\end_inset
name
\begin_inset Quotes erd
-\end_inset
+\end_inset
field or the XML will not be generated correctly.
-\layout LyX-Code
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
-\layout LyX-Code
+\end_layout
-\layout LyX-Code
+\begin_layout LyX-Code
-\layout LyX-Code
+\end_layout
-\layout LyX-Code
+\begin_layout LyX-Code
-\layout LyX-Code
+\end_layout
-\the_end
+\end_body
+\end_document
diff --git a/tools/XRCWidgets-0.1.6.ebuild b/tools/XRCWidgets-0.1.6.ebuild
new file mode 100644
index 0000000..c57073f
--- /dev/null
+++ b/tools/XRCWidgets-0.1.6.ebuild
@@ -0,0 +1,25 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
+
+inherit distutils
+
+DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
+SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_5/XRCWidgets-0.1.5.tar.gz"
+HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+LICENSE="wxWinLL-3"
+
+RESTRICT="nomirror"
+
+DEPEND=">=dev-lang/python-2.3
+ >=dev-python/wxpython-2.6"
+
+src_install() {
+ distutils_src_install
+}
+
+
|
rfk/xrcwidgets
|
44cf633bc06da22b1af06efdca4615c5fadbb585
|
Bugfixes, testing out toolbar functionality
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index bf1206d..97e8b3f 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,537 +1,531 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
VER_MAJOR = 0
VER_MINOR = 1
VER_REL = 5
VER_PATCH = ""
VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
#from wxPython import wx as wx2
#_WorkAround_app = wx2.wxPySimpleApp(0)
#del _WorkAround_app
#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
- print menu, mData.attrs.get("name")
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
- print "LOOKING FOR MENU ITEM:", lbl
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
- print "LOOKING FOR MENU:", lbl
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
- print "FOUND MENU BAR:", menu
- print menu.GetMenuCount()
- print menu.FindMenu(lbl)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
self.__app = wx.PySimpleApp(0)
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/XRCWidgets/connectors.py b/XRCWidgets/connectors.py
index 3c89242..9c6bde9 100644
--- a/XRCWidgets/connectors.py
+++ b/XRCWidgets/connectors.py
@@ -1,205 +1,205 @@
"""
XRCWidgets.connectors: Classes to connect events for XRCWidgets
This module provides subclasses of Connector, which are responsible
for hooking up event listeners for a particular type of action
within the XRCWidgets framework. These are key to the "Magic Methods"
functionality of XRCWidgets.
For example, the method named:
on_mytextbox_change()
Is connected using the ChangeConnector() class. The class for a
given event action can be determined by inspecting the dictionary
returned by the function getConnectors().
"""
import wx
from XRCWidgets.utils import lcurry
class Connector:
"""Class responsible for connecting events within XRCWidgets
Subclasses of this abstract base class provide the method
connect() which will produce the necessary connection
based on the named child type.
"""
# Internally, the connections are managed by a dictionary of
# methods, one per child type. The entries are listed on
# the class
_cons_entries = ()
def __init__(self):
self._cons = {}
for entry in self._cons_entries:
self._cons[entry] = getattr(self,"connect_"+entry)
def connect(self,cName,parent,handler):
"""Connect <handler> to the named child of the given parent.
This method must return True if the connection succeeded,
False otherwise.
"""
cType = parent.getChildType(cName)
if self._cons.has_key(cType):
return self._cons[cType](cName,parent,handler)
return False
class ChangeConnector(Connector):
"""Connector for the "change" event.
This event is activated when the value of a control changes
due to user input. The handler should expect a reference
to the control itself as its only argument.
"""
_cons_entries = ("wxTextCtrl","wxCheckBox","wxListBox",
"wxComboBox","wxRadioBox","wxChoice")
def connect_wxTextCtrl(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(parent,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
return True
def connect_wxCheckBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(parent,parent.getChildId(cName),handler)
return True
def connect_wxListBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(parent,parent.getChildId(cName),handler)
return True
def connect_wxComboBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(parent,parent.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(parent,parent.getChildId(cName),handler)
return True
def connect_wxRadioBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(parent,parent.getChildId(cName),handler)
return True
def connect_wxChoice(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(parent,parent.getChildId(cName),handler)
return True
class ContentConnector(Connector):
"""Connector handling the 'content' event.
This is a sort of pseudo-event that is only triggered
once, at widget creation time. It is used to programatically
create the child content of a particular widget. The
event handler must expect the named child widget as its
only argument, and return the newly created content for that
child widget.
"""
def connect(self,cName,parent,handler):
child = parent.getChild(cName)
widget = handler(child)
parent.replaceInWindow(child,widget)
return True
class ActivateConnector(Connector):
"""Connector handling the 'activate' event.
This event is fired when a control, such as a button, is
activated by the user - similar to a 'click' event.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
_cons_entries = ("wxButton","wxCheckBox","wxMenuItem",
"tool","wxListBox")
def connect_wxButton(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(parent,child.GetId(),handler)
return True
def connect_wxCheckBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(parent,child.GetId(),handler)
return True
def connect_wxMenuItem(self,cName,parent,handler):
handler = lcurry(_EvtHandleWithEvt,handler)
cID = parent.getChildId(cName)
wx.EVT_MENU(parent,cID,handler)
return True
def connect_tool(self,cName,parent,handler):
- handler = lcurry(_EvtHandle,handler)
+ handler = lcurry(_EvtHandleWithEvt,handler)
wx.EVT_MENU(parent,parent.getChildId(cName),handler)
return True
def connect_wxListBox(self,cName,parent,handler):
child = parent.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(parent,parent.getChildId(cName),handler)
return True
def getConnectors():
"""Construct and return dictionary of connectors."""
cons = {}
cons["change"] = ChangeConnector()
cons["content"] = ContentConnector()
cons["activate"] = ActivateConnector()
return cons
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleWithEvt(toCall,evnt):
"""Handle an event by invoking <toCall> with the event as argument.
"""
toCall(evnt)
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
-
\ No newline at end of file
+
diff --git a/examples/everything.py b/examples/everything.py
index 5d6ae12..d842d73 100644
--- a/examples/everything.py
+++ b/examples/everything.py
@@ -1,111 +1,118 @@
#
# everything.py - large, useless app for demonstrating the functionality
# of the XRCWidgets toolkit
#
from XRCWidgets import XRCApp, XRCDialog, XRCFrame, XRCPanel
def run():
app = MainFrame()
app.MainLoop()
# The main application window
class MainFrame(XRCApp):
def __init__(self,*args,**kwds):
XRCApp.__init__(self,*args,**kwds)
# Internal boolean for radio menu items
self._reportTB = False
# Set menus to initial values
# This is currently broken on my Linux machine...
- #self.getChild("m_edit_reportcb").Check()
- #self.getChild("m_edit_tb").Check()
+ self.getChild("m_edit_reportcb").Check()
+ self.getChild("m_edit_tb").Check()
# Popup report frame showing message
def report(self,msg):
frm = ReportFrame(msg,self)
frm.Show()
# Show a SelectPanel inside the desired panel
def on_select_panel_content(self,parent):
return SelectPanel(parent)
# Quit application when "Exit" is selected
def on_m_file_exit_activate(self,evt):
self.Close(True)
# Popup the about dialog from the help menu item
def on_m_help_about_activate(self,evt):
dlg = AboutDialog(self)
dlg.ShowModal()
+ def on_t_about_activate(self,evt):
+ dlg = AboutDialog(self)
+ dlg.ShowModal()
+
+ def on_t_report_activate(self,evt):
+ self.report("Reporting from the toolbar!")
+
# Switch reporting modes on/off with activations
def on_m_edit_reporttb_activate(self,evt):
self._reportTB = True
def on_m_edit_reportcb_activate(self,evt):
self._reportTB = False
# Enable/Disable editing of textbox contents
def on_m_edit_tb_activate(self,evt):
self.getChild("text_ctrl").Enable(evt.IsChecked())
# Report value of textbox or combobox when button clicked
def on_button_activate(self,chld):
if self._reportTB:
self.report(self.getChild("text_ctrl").GetValue())
else:
self.report(self.getChild("combo_box").GetValue())
# Print out new values when textbox or combobox change
def on_text_ctrl_change(self,chld):
print "TEXTBOX NOW CONTAINS:", chld.GetValue()
def on_combo_box_change(self,chld):
print "COMBOBOX NOW CONTAINS:", chld.GetValue()
# Print out selected value in listbox when changed
def on_list_box_change(self,chld):
print "LISTBOX HAS SELECTED:", chld.GetStringSelection()
# An report it when it is double-clicked
def on_list_box_activate(self,chld):
self.report(chld.GetStringSelection())
# Panel containing some additional widgets
class SelectPanel(XRCPanel):
def __init__(self,*args,**kwds):
XRCPanel.__init__(self,*args,**kwds)
self.getChild("checkbox").SetValue(True)
# Use checkbox to enable/disable radio buttons
def on_checkbox_change(self,chld):
self.getChild("radio_box").Enable(chld.IsChecked())
# Print radiobox selections to the screen
def on_radio_box_change(self,chld):
print "RADIOBOX HAS SELECTED:", chld.GetStringSelection()
# Simialr for the wxChoice
def on_choice_change(self,chld):
print "CHOICE HAS SELECTED:", chld.GetStringSelection()
# Simple static about dialog
class AboutDialog(XRCDialog):
pass
# Popup Frame for reporting Values
class ReportFrame(XRCFrame):
def __init__(self,msg,*args,**kwds):
XRCFrame.__init__(self,*args,**kwds)
self.getChild("value_text").SetLabel(msg)
def on_done_button_activate(self,evt):
self.Destroy()
diff --git a/examples/everything.xrc b/examples/everything.xrc
index 7872548..66ca596 100644
--- a/examples/everything.xrc
+++ b/examples/everything.xrc
@@ -1,271 +1,277 @@
-<?xml version="1.0" ?>
-<!-- generated by wxGlade 0.3.4 on Sun Sep 12 23:26:19 2004 -->
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- generated by wxGlade 0.4 on Wed Jul 12 14:33:32 2006 -->
<resource version="2.3.0.1">
- <object class="wxFrame" name="MainFrame">
+ <object class="wxFrame" name="MainFrame" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>The App with Everything!</title>
<object class="wxMenuBar" name="MainFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
- <help>Exit the Application</help>
</object>
</object>
<object class="wxMenu" name="m_edit">
<label>Edit</label>
<object class="wxMenuItem" name="m_edit_tb">
<label>Allow Textbox Editing</label>
<checkable>1</checkable>
</object>
<object class="wxMenuItem" name="m_edit_reporttb">
<label>Report Textbox Contents</label>
<radio>1</radio>
</object>
<object class="wxMenuItem" name="m_edit_reportcb">
<label>Report ComboBox Contents</label>
<radio>1</radio>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>About...</label>
- <help>Show About Dialog</help>
</object>
</object>
</object>
- <object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL</flag>
<border>5</border>
<object class="wxButton" name="button">
<label>Button</label>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxTextCtrl" name="text_ctrl">
<style>wxTE_PROCESS_ENTER</style>
<value>Text Ctrl</value>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxStaticText" name="static_text">
<label>Static Text</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxComboBox" name="combo_box">
<selection>0</selection>
<content>
<item>Combo Box</item>
<item>Option 2</item>
<item>Option 3</item>
</content>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxEXPAND</flag>
<border>10</border>
<object class="wxListBox" name="list_box">
<style>wxLB_SINGLE</style>
<selection>0</selection>
<content>
<item>List Box</item>
<item>Option 1</item>
<item>Option 2</item>
</content>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxADJUST_MINSIZE</flag>
<object class="wxPanel" name="select_panel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticText" name="label_1">
<label>SelectPanel Goes Here</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
+ <object class="wxToolBar" name="MainFrame_toolbar">
+ <style>wxTB_TEXT|wxTB_HORIZONTAL</style>
+ <object class="tool" name="t_about">
+ <label>About</label>
+ <bitmap>tb1.bmp</bitmap>
+ </object>
+ <object class="separator"/>
+ <object class="tool" name="t_report">
+ <label>Report</label>
+ <bitmap>tb2.bmp</bitmap>
+ </object>
</object>
</object>
- <object class="wxPanel" name="SelectPanel">
+ <object class="wxPanel" name="SelectPanel" subclass="MyPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>5</border>
<object class="wxCheckBox" name="checkbox">
<label>Checkbox</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>3</border>
<object class="wxRadioBox" name="radio_box">
<content>
<item>Option 1 </item>
<item>Option 2 </item>
<item>Option 3 </item>
</content>
<style>wxRA_SPECIFY_COLS</style>
<selection>0</selection>
<dimension>1</dimension>
<label>Radio Box</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>10</border>
<object class="wxChoice" name="choice">
<selection>0</selection>
<content>
<item>Choice</item>
<item>Option 2</item>
<item>Option 3</item>
</content>
</object>
</object>
</object>
</object>
</object>
</object>
- <object class="wxFrame" name="ReportFrame">
+ <object class="wxDialog" name="AboutDialog" subclass="MyDialog">
+ <style>wxDEFAULT_DIALOG_STYLE</style>
+ <title>About this App</title>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>10</border>
+ <object class="wxStaticText" name="label_2">
+ <label>The Everything App</label>
+ <font>
+ <style>normal</style>
+ <family>default</family>
+ <weight>bold</weight>
+ <underlined>0</underlined>
+ <size>15</size>
+ </font>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>10</border>
+ <object class="wxTextCtrl" name="text_ctrl_1">
+ <style>wxTE_MULTILINE|wxTE_LINEWRAP</style>
+ <value>This is a do-nothing application designed to showcase the functionality available in the XRCWidgets toolkit.</value>
+ <size>200, 200</size>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="wxFrame" name="ReportFrame" subclass="MyFrame">
<style>wxCAPTION|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSTAY_ON_TOP|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
<title>Reporting Your Value...</title>
- <object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>20</border>
<object class="wxStaticText" name="label_3">
<label>The Value Is:</label>
<font>
<style>normal</style>
<family>default</family>
<weight>normal</weight>
<underlined>0</underlined>
<size>10</size>
</font>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag>
<border>5</border>
<object class="wxStaticText" name="value_text">
<label>Value Displayed Here</label>
<font>
<style>italic</style>
<family>default</family>
<weight>bold</weight>
<underlined>0</underlined>
<size>20</size>
</font>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>15</border>
<object class="wxButton" name="done_button">
<default>1</default>
<label>Done</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
- </object>
- </object>
- <object class="wxDialog" name="AboutDialog">
- <style>wxDEFAULT_DIALOG_STYLE</style>
- <title>About this App</title>
- <object class="wxBoxSizer">
- <orient>wxVERTICAL</orient>
- <object class="sizeritem">
- <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
- <border>10</border>
- <object class="wxStaticText" name="label_2">
- <label>The Everything App</label>
- <font>
- <style>normal</style>
- <family>default</family>
- <weight>bold</weight>
- <underlined>0</underlined>
- <size>15</size>
- </font>
- </object>
- </object>
- <object class="sizeritem">
- <option>1</option>
- <flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
- <object class="wxBoxSizer">
- <orient>wxHORIZONTAL</orient>
- <object class="sizeritem">
- <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
- <border>10</border>
- <object class="wxTextCtrl" name="text_ctrl_1">
- <style>wxTE_MULTILINE|wxTE_LINEWRAP</style>
- <value>This is a do-nothing application designed to showcase the functionality available in the XRCWidgets toolkit.</value>
- <size>200, 200</size>
- </object>
- </object>
- </object>
- </object>
- </object>
</object>
</resource>
diff --git a/examples/tb1.bmp b/examples/tb1.bmp
new file mode 100644
index 0000000..758cc56
Binary files /dev/null and b/examples/tb1.bmp differ
diff --git a/examples/tb2.bmp b/examples/tb2.bmp
new file mode 100644
index 0000000..293a1ce
Binary files /dev/null and b/examples/tb2.bmp differ
|
rfk/xrcwidgets
|
ddded93af646e5793984716e57b8c03dadc3dd99
|
git-svn-id: file:///storage/svnroot/software/XRCWidgets/trunk@43 5b905b9f-cef6-0310-8904-a74f1b98bbbd
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index b87a57c..bf1206d 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,537 +1,537 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
VER_MAJOR = 0
VER_MINOR = 1
VER_REL = 5
VER_PATCH = ""
VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
-from wxPython import wx as wx2
-_WorkAround_app = wx2.wxPySimpleApp(0)
-del _WorkAround_app
-del wx2
+#from wxPython import wx as wx2
+#_WorkAround_app = wx2.wxPySimpleApp(0)
+#del _WorkAround_app
+#del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
print menu, mData.attrs.get("name")
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
print "LOOKING FOR MENU ITEM:", lbl
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
print "LOOKING FOR MENU:", lbl
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
print "FOUND MENU BAR:", menu
print menu.GetMenuCount()
print menu.FindMenu(lbl)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
- XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
+ XRCFrame.__init__(self,parent,*args,**kwds)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
diff --git a/examples/simple.py b/examples/simple.py
index 4e0c324..19783be 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -1,19 +1,20 @@
from wxPython import wx
from XRCWidgets import XRCApp
class SimpleApp(XRCApp):
def on_message_change(self,msg):
print "MESSAGE IS NOW:", msg.GetValue()
def on_ok_activate(self,bttn):
print self.getChild("message").GetValue()
def run():
app = SimpleApp()
app.MainLoop()
+
|
rfk/xrcwidgets
|
7e710ac2de174634ace5576c494ca9d5f087c8d3
|
Bugfixes thanks to Brad
|
diff --git a/docs/manual.lyx b/docs/manual.lyx
index 9b892ef..cff69f6 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,528 +1,528 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
\layout Standard
This document is Copyright 2004, Ryan Kelly.
Verbatim copies may be made and distributed without restriction.
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
\layout Subsection
Underlying Technologies
\layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
\newline
http://www.wxwidgets.org/
\layout Itemize
wxPython is a wxWidgets binding for the Python language
\newline
http://www.wxPython.org
\layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
\layout Subsection
Purpose
\layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
\layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
XRCWidgets, and if final versions require greater efficiency than the toolkit
can provide it is a simple matter to convert the XRC files into Python
or C++ code.
\layout Subsection
Advantages
\layout Subsubsection
Rapid GUI Development
\layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
the rest of the application.
\layout Subsubsection
Declarative Event Handling
\layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
\layout Subsubsection
Separation of Layout from Code
\layout Standard
Rapid GUI development is also possible using design applications that directly
output Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
n and almost impossible to reverse-engineer the code for further editing.
\layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
\layout Subsubsection
Easy Conversion to Native Code
\layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
\layout Subsubsection
Compatibility with Standard wxPython Code
\layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
collection of child widgets created and event handlers connected as it
is initialised.
\layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
\layout Subsubsection
Simple Re-sizing of GUI
\layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
\layout Section
Classes Provided
\layout Standard
The classes provided by the XRCWidgets framework are detailed below.
\layout Subsection
XRCWidgetsError
\layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
\layout Subsection
XRCWidget
\layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
\layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
\layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
\layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
\layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
\layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
\layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
\layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
\layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
\layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
\end_inset
replaceInChild
\begin_inset Quotes erd
\end_inset
in the constructor
\layout Subsection
XRCPanel
\layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCDialog
\layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCFrame
\layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCApp
\layout Standard
-XRCFrame inherits from XRCFrame and is designed to provide a shortcut for
+XRCApp inherits from XRCFrame and is designed to provide a shortcut for
specifying the main frame of an application.
It provides the methods
\begin_inset Quotes eld
\end_inset
MainLoop
\begin_inset Quotes erd
\end_inset
and
\begin_inset Quotes eld
\end_inset
EndMainLoop
\begin_inset Quotes erd
\end_inset
mirroring those of the wxApp class.
When created, it creates a private wxApp class and makes itself the top-level
window for the application.
\layout Section
Tutorials
\layout Standard
The following are a number of quick tutorials to get you started using the
framework.
The code for these tutorials can be found in the 'examles' directory of
the source distribution.
\layout Subsection
The Basics
\layout Standard
This section provides a quick tutorial for creating an appliction using
the XRCWidgets framework.
The application will consist of a single widget called 'SimpleApp', and
will live in the file 'simple.py'.
It will consist of a wxFrame with a text-box and a button, which prints
a message to the terminal when the button is clicked.
The frame will look something like this:
\layout Standard
\added_space_top smallskip \added_space_bottom smallskip \align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
\end_inset
\layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
\layout Subsubsection
Creating the XRC File
\layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
\layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
\layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
\end_inset
Add a Frame
\begin_inset Quotes erd
\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
\end_inset
SimpleApp
\begin_inset Quotes erd
\end_inset
- this is to correspond to the name of the class that is to be created.
\layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
and a button named
\begin_inset Quotes eld
\end_inset
ok
\begin_inset Quotes erd
\end_inset
.
\layout Standard
-When the frame is finished, selected Generate Code from the File menu to
+When the frame is finished, selecte Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
\end_inset
xrc2wxg
\begin_inset Quotes erd
\end_inset
which can convert from the XRC file to a wxGlade project file.
\layout Subsubsection
Creating the Python Code
\layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
\layout Standard
Next, create the python file 'simple.py' using the following code:
\layout LyX-Code
from XRCWidgets import XRCApp
\layout LyX-Code
class SimpleApp(XRCApp):
\layout LyX-Code
def on_message_change(self,msg):
\layout LyX-Code
print
\begin_inset Quotes eld
\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
\end_inset
, msg.GetValue()
\layout LyX-Code
def on_ok_activate(self,bttn):
\layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
).GetValue()
\layout Standard
This code is all that is required to make a functioning application.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
\end_inset
on_message_change
\begin_inset Quotes erd
\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
\end_inset
on_ok_activate
\begin_inset Quotes erd
\end_inset
will be called whenever the button is clicked.
\layout Subsubsection
Testing the Widget
\layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
\layout LyX-Code
from simple import SimpleApp
\layout LyX-Code
app = SimpleApp()
\layout LyX-Code
app.MainLoop()
\layout Standard
This code imports the widget's definition, creates the application and runs
the event loop.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
\layout Subsection
A more complicated Frame
\layout Standard
This tutorial is yet to be completed.
See the files 'menus.py' and menus.xrc' in the examples directory.
\layout Standard
Quick Guide:
\layout Itemize
Create a frame as usual, and select the 'Has MenuBar' option in its properties.
Do *not* create a seperate MenuBar, this wont work.
\layout Itemize
Edit the menus of the MenuBar to your liking.
Ensure that you fill in the
\begin_inset Quotes eld
\end_inset
name
\begin_inset Quotes erd
\end_inset
field or the XML will not be generated correctly.
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\the_end
diff --git a/tools/XRCWidgets-0.1.5.ebuild b/tools/XRCWidgets-0.1.5.ebuild
index 0030004..2154d21 100644
--- a/tools/XRCWidgets-0.1.5.ebuild
+++ b/tools/XRCWidgets-0.1.5.ebuild
@@ -1,23 +1,25 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
inherit distutils
DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_5/XRCWidgets-0.1.5.tar.gz"
HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
IUSE=""
SLOT="0"
KEYWORDS="~x86 ~amd64"
LICENSE="wxWinLL-3"
+RESTRICT="nomirror"
+
DEPEND=">=dev-lang/python-2.3
>=dev-python/wxpython-2.4.2.4"
src_install() {
distutils_src_install
}
|
rfk/xrcwidgets
|
59a7d4416a52bd3a7fb303ac984ac357c68242dd
|
Moved VERSION info into the module itself
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 6289e6f..b87a57c 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,525 +1,532 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
+VER_MAJOR = 0
+VER_MINOR = 1
+VER_REL = 5
+VER_PATCH = ""
+VERSION = "%d.%d.%d%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)
+
+
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
print menu, mData.attrs.get("name")
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
print "LOOKING FOR MENU ITEM:", lbl
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
print "LOOKING FOR MENU:", lbl
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
print "FOUND MENU BAR:", menu
print menu.GetMenuCount()
print menu.FindMenu(lbl)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
hndlr = getattr(self,mName)
if not callable(hndlr):
break
if connectors[action].connect(cName,self,hndlr):
break
else:
eStr = "Widget type <%s> not supported by"
eStr = eStr + " '%s' action."
cType = self.getChildType(cName)
raise XRCWidgetsError(eStr % (cType,action))
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
diff --git a/setup.py b/setup.py
index 647af29..d7f6d4f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,55 +1,52 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
import os
NAME = "XRCWidgets"
-VER_MAJOR = "0"
-VER_MINOR = "1"
-VER_REL = "5"
-VER_PATCH = ""
+from XRCWidgets import VERSION
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
if eName.endswith(".py") or eName.endswith(".xrc"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
- version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
+ version=VERSION,
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
11709ec174b588ab9a899bc5c00a1bbd1706c957
|
Reworked the event/action connection code. Made wxMenuItem work by ID, so it works on my Linux box again.
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index ba558fe..6289e6f 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,662 +1,530 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
+from XRCWidgets.connectors import getConnectors
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
-
+del wx2
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
- ## wxPython 2.5 introduces the PostCreate method to wrap a lot
+ ## wxPython 2.5 introduces the PostCreate method to wrap some
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
print menu, mData.attrs.get("name")
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
- # indicator.
+ # indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
print "LOOKING FOR MENU ITEM:", lbl
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
print "LOOKING FOR MENU:", lbl
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
print "FOUND MENU BAR:", menu
print menu.GetMenuCount()
print menu.FindMenu(lbl)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
mbar = parent.GetMenuBar()
return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
+ connectors = getConnectors()
for mName in dir(self):
if mName.startswith(prfx):
- for action in self._EVT_ACTIONS:
+ for action in connectors:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
- handler = getattr(self,mName)
- if not callable(handler):
+ hndlr = getattr(self,mName)
+ if not callable(hndlr):
break
+ if connectors[action].connect(cName,self,hndlr):
+ break
+ else:
+ eStr = "Widget type <%s> not supported by"
+ eStr = eStr + " '%s' action."
+ cType = self.getChildType(cName)
+ raise XRCWidgetsError(eStr % (cType,action))
- cnctFuncName = self._EVT_ACTIONS[action]
- cnctFunc = getattr(self,cnctFuncName)
- cnctFunc(cName,handler)
- break
-
- ## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
- ## of methods of this class that should be used to connect events for
- ## that action. Such methods must take the name of the child in question
- ## and the callable object to connect to, and need not return any value.
-
- _EVT_ACTIONS = {
- "change": "_connectAction_Change",
- "content": "_connectAction_Content",
- "activate": "_connectAction_Activate",
- }
-
-
- def _connectAction_Change(self,cName,handler):
- """Arrange to call <handler> when widget <cName>'s value is changed.
-
- The events connected by this method will be different depending on the
- precise type of <child>. The handler to be called should expect the
- control itself as an optional argument, which may or may not be received
- depending on the type of control. It may be wrapped so that the
- event is skipped in order to avoid a lot of cross-platform issues.
- """
- cType = self.getChildType(cName)
-
- # enourmous switch on child widget type
- # TODO: this would be better implemented using a dictionary
- if cType == "wxTextCtrl":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandleAndSkip,handler)
- wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
- wx.EVT_KILL_FOCUS(child,handler)
- elif cType == "wxCheckBox":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
- elif cType == "wxListBox":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
- elif cType == "wxComboBox":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
- wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
- elif cType == "wxRadioBox":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
- elif cType == "wxChoice":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_CHOICE(self,self.getChildId(cName),handler)
- else:
- eStr = "Widget type <%s> not supported by 'Change' action."
- raise XRCWidgetsError(eStr % cType)
-
-
-
- def _connectAction_Content(self,cName,handler):
- """Replace the content of <child> with that returned by method <mName>.
-
- Strictly, this is not an 'event' handler as it only performs actions
- on initialisation. It is however a useful piece of functionality and
- fits nicely in the framework. <handler> will be called with the child
- widget as its only argument, and should return a wxWindow. This
- window will be shown as the only content of the child window.
- """
- child = self.getChild(cName)
- widget = handler(child)
- self.replaceInWindow(child,widget)
-
-
- def _connectAction_Activate(self,cName,handler):
- """Arrange to call <handler> when child <cName> is activated.
- The events connected by this method will be different depending on the
- precise type of the child. The method to be called may expect the
- control itself as a default argument, passed depending on the type
- of the control.
- """
- cType = self.getChildType(cName)
-
- # enourmous switch on child widget type
- if cType == "wxButton":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_BUTTON(self,child.GetId(),handler)
- elif cType == "wxCheckBox":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_CHECKBOX(self,child.GetId(),handler)
- elif cType == "wxMenuItem":
- #child = self.getChild(cName)
- #handler = lcurry(handler,child)
- #handler = lcurry(_EvtHandle,handler)
- cID = self.getChildId(cName)
- wx.EVT_MENU(self,cID,handler)
- elif cType == "tool":
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_MENU(self,self.getChildId(cName),handler)
- elif cType == "wxListBox":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
- else:
- eStr = "Widget type <%s> not supported by 'Activate' action."
- raise XRCWidgetsError(eStr % child.__class__)
-
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
-########
-##
-## Miscellaneous Useful Functions
-##
-########
-
-
-def _EvtHandle(toCall,evnt):
- """Handle an event by invoking <toCall> without arguments.
- The event itself is ignored.
- """
- toCall()
-
-def _EvtHandleAndSkip(toCall,evnt):
- """Handle an event by invoking <toCall> then <evnt>.Skip().
- This function does *not* pass <evnt> as an argument to <toCall>,
- it simply invokes it directly.
- """
- toCall()
- evnt.Skip()
-
diff --git a/XRCWidgets/connectors.py b/XRCWidgets/connectors.py
new file mode 100644
index 0000000..3c89242
--- /dev/null
+++ b/XRCWidgets/connectors.py
@@ -0,0 +1,205 @@
+"""
+
+ XRCWidgets.connectors: Classes to connect events for XRCWidgets
+
+This module provides subclasses of Connector, which are responsible
+for hooking up event listeners for a particular type of action
+within the XRCWidgets framework. These are key to the "Magic Methods"
+functionality of XRCWidgets.
+
+For example, the method named:
+
+ on_mytextbox_change()
+
+Is connected using the ChangeConnector() class. The class for a
+given event action can be determined by inspecting the dictionary
+returned by the function getConnectors().
+
+"""
+
+import wx
+from XRCWidgets.utils import lcurry
+
+class Connector:
+ """Class responsible for connecting events within XRCWidgets
+ Subclasses of this abstract base class provide the method
+ connect() which will produce the necessary connection
+ based on the named child type.
+ """
+
+ # Internally, the connections are managed by a dictionary of
+ # methods, one per child type. The entries are listed on
+ # the class
+ _cons_entries = ()
+
+ def __init__(self):
+ self._cons = {}
+ for entry in self._cons_entries:
+ self._cons[entry] = getattr(self,"connect_"+entry)
+
+ def connect(self,cName,parent,handler):
+ """Connect <handler> to the named child of the given parent.
+ This method must return True if the connection succeeded,
+ False otherwise.
+ """
+ cType = parent.getChildType(cName)
+ if self._cons.has_key(cType):
+ return self._cons[cType](cName,parent,handler)
+ return False
+
+
+class ChangeConnector(Connector):
+ """Connector for the "change" event.
+ This event is activated when the value of a control changes
+ due to user input. The handler should expect a reference
+ to the control itself as its only argument.
+ """
+
+ _cons_entries = ("wxTextCtrl","wxCheckBox","wxListBox",
+ "wxComboBox","wxRadioBox","wxChoice")
+
+ def connect_wxTextCtrl(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandleAndSkip,handler)
+ wx.EVT_TEXT_ENTER(parent,child.GetId(),handler)
+ wx.EVT_KILL_FOCUS(child,handler)
+ return True
+
+ def connect_wxCheckBox(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_CHECKBOX(parent,parent.getChildId(cName),handler)
+ return True
+
+ def connect_wxListBox(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_LISTBOX(parent,parent.getChildId(cName),handler)
+ return True
+
+ def connect_wxComboBox(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_COMBOBOX(parent,parent.getChildId(cName),handler)
+ wx.EVT_TEXT_ENTER(parent,parent.getChildId(cName),handler)
+ return True
+
+ def connect_wxRadioBox(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_RADIOBOX(parent,parent.getChildId(cName),handler)
+ return True
+
+ def connect_wxChoice(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_CHOICE(parent,parent.getChildId(cName),handler)
+ return True
+
+
+class ContentConnector(Connector):
+ """Connector handling the 'content' event.
+ This is a sort of pseudo-event that is only triggered
+ once, at widget creation time. It is used to programatically
+ create the child content of a particular widget. The
+ event handler must expect the named child widget as its
+ only argument, and return the newly created content for that
+ child widget.
+ """
+
+ def connect(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ widget = handler(child)
+ parent.replaceInWindow(child,widget)
+ return True
+
+
+class ActivateConnector(Connector):
+ """Connector handling the 'activate' event.
+ This event is fired when a control, such as a button, is
+ activated by the user - similar to a 'click' event.
+ The events connected by this method will be different depending on the
+ precise type of the child. The method to be called may expect the
+ control itself as a default argument, passed depending on the type
+ of the control.
+ """
+
+ _cons_entries = ("wxButton","wxCheckBox","wxMenuItem",
+ "tool","wxListBox")
+
+ def connect_wxButton(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_BUTTON(parent,child.GetId(),handler)
+ return True
+
+ def connect_wxCheckBox(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_CHECKBOX(parent,child.GetId(),handler)
+ return True
+
+ def connect_wxMenuItem(self,cName,parent,handler):
+ handler = lcurry(_EvtHandleWithEvt,handler)
+ cID = parent.getChildId(cName)
+ wx.EVT_MENU(parent,cID,handler)
+ return True
+
+ def connect_tool(self,cName,parent,handler):
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_MENU(parent,parent.getChildId(cName),handler)
+ return True
+
+ def connect_wxListBox(self,cName,parent,handler):
+ child = parent.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_LISTBOX_DCLICK(parent,parent.getChildId(cName),handler)
+ return True
+
+
+def getConnectors():
+ """Construct and return dictionary of connectors."""
+ cons = {}
+ cons["change"] = ChangeConnector()
+ cons["content"] = ContentConnector()
+ cons["activate"] = ActivateConnector()
+ return cons
+
+
+########
+##
+## Miscellaneous Useful Functions
+##
+########
+
+
+def _EvtHandle(toCall,evnt):
+ """Handle an event by invoking <toCall> without arguments.
+ The event itself is ignored.
+ """
+ toCall()
+
+def _EvtHandleWithEvt(toCall,evnt):
+ """Handle an event by invoking <toCall> with the event as argument.
+ """
+ toCall(evnt)
+
+def _EvtHandleAndSkip(toCall,evnt):
+ """Handle an event by invoking <toCall> then <evnt>.Skip().
+ This function does *not* pass <evnt> as an argument to <toCall>,
+ it simply invokes it directly.
+ """
+ toCall()
+ evnt.Skip()
+
+
+
\ No newline at end of file
diff --git a/examples/demo.py b/examples/demo.py
index bd8d6cc..fae4c87 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,50 +1,50 @@
from wxPython import wx
from XRCWidgets import XRCApp, XRCDialog
from demo_widgets import DemoPanel
# Simple frame to demonstrate the use of menus and toolbar.
# Also shows how on_content() can be used to place widgets at creation time.
class DemoApp(XRCApp):
- def on_m_file_exit_activate(self,ctrl):
+ def on_m_file_exit_activate(self,evt):
"""Close the application"""
self.Close()
- def on_m_file_new_activate(self,ctrl):
+ def on_m_file_new_activate(self,evt):
"""Create a new DemoPanel in the display area."""
dsp = self.getChild("displayarea")
p = DemoPanel(dsp)
self.replaceInWindow(dsp,p)
def on_tb_new_activate(self):
self.on_m_file_new_activate(None)
- def on_m_help_about_activate(self,ctrl):
+ def on_m_help_about_activate(self,evt):
"""Show the About dialog."""
dlg = AboutDemoDialog(self)
dlg.ShowModal()
dlg.Destroy()
def on_tb_about_activate(self):
self.on_m_help_about_activate(None)
def on_displayarea_content(self,ctrl):
"""Initialise display area to contain a DemoPanel."""
return DemoPanel(ctrl)
# About Dialog demonstrates how to explicitly set widget name
# Other properies such as filename (_xrcfilename) and file location
# (_xrcfile) can be set similarly
class AboutDemoDialog(XRCDialog):
_xrcname = "about"
# Instantiate and run the application
def run():
app = DemoApp()
app.MainLoop()
diff --git a/examples/everything.py b/examples/everything.py
index 5a7e974..5d6ae12 100644
--- a/examples/everything.py
+++ b/examples/everything.py
@@ -1,110 +1,111 @@
#
# everything.py - large, useless app for demonstrating the functionality
# of the XRCWidgets toolkit
#
from XRCWidgets import XRCApp, XRCDialog, XRCFrame, XRCPanel
def run():
app = MainFrame()
app.MainLoop()
# The main application window
class MainFrame(XRCApp):
def __init__(self,*args,**kwds):
XRCApp.__init__(self,*args,**kwds)
# Internal boolean for radio menu items
self._reportTB = False
# Set menus to initial values
- self.getChild("m_edit_reportcb").Check()
- self.getChild("m_edit_tb").Check()
+ # This is currently broken on my Linux machine...
+ #self.getChild("m_edit_reportcb").Check()
+ #self.getChild("m_edit_tb").Check()
# Popup report frame showing message
def report(self,msg):
frm = ReportFrame(msg,self)
frm.Show()
# Show a SelectPanel inside the desired panel
def on_select_panel_content(self,parent):
return SelectPanel(parent)
# Quit application when "Exit" is selected
- def on_m_file_exit_activate(self,chld):
+ def on_m_file_exit_activate(self,evt):
self.Close(True)
# Popup the about dialog from the help menu item
- def on_m_help_about_activate(self,chld):
+ def on_m_help_about_activate(self,evt):
dlg = AboutDialog(self)
dlg.ShowModal()
# Switch reporting modes on/off with activations
- def on_m_edit_reporttb_activate(self,chld):
+ def on_m_edit_reporttb_activate(self,evt):
self._reportTB = True
- def on_m_edit_reportcb_activate(self,chld):
+ def on_m_edit_reportcb_activate(self,evt):
self._reportTB = False
# Enable/Disable editing of textbox contents
- def on_m_edit_tb_activate(self,chld):
- self.getChild("text_ctrl").Enable(chld.IsChecked())
+ def on_m_edit_tb_activate(self,evt):
+ self.getChild("text_ctrl").Enable(evt.IsChecked())
# Report value of textbox or combobox when button clicked
def on_button_activate(self,chld):
if self._reportTB:
self.report(self.getChild("text_ctrl").GetValue())
else:
self.report(self.getChild("combo_box").GetValue())
# Print out new values when textbox or combobox change
def on_text_ctrl_change(self,chld):
print "TEXTBOX NOW CONTAINS:", chld.GetValue()
def on_combo_box_change(self,chld):
print "COMBOBOX NOW CONTAINS:", chld.GetValue()
# Print out selected value in listbox when changed
def on_list_box_change(self,chld):
print "LISTBOX HAS SELECTED:", chld.GetStringSelection()
# An report it when it is double-clicked
def on_list_box_activate(self,chld):
self.report(chld.GetStringSelection())
# Panel containing some additional widgets
class SelectPanel(XRCPanel):
def __init__(self,*args,**kwds):
XRCPanel.__init__(self,*args,**kwds)
self.getChild("checkbox").SetValue(True)
# Use checkbox to enable/disable radio buttons
def on_checkbox_change(self,chld):
self.getChild("radio_box").Enable(chld.IsChecked())
# Print radiobox selections to the screen
def on_radio_box_change(self,chld):
print "RADIOBOX HAS SELECTED:", chld.GetStringSelection()
# Simialr for the wxChoice
def on_choice_change(self,chld):
print "CHOICE HAS SELECTED:", chld.GetStringSelection()
# Simple static about dialog
class AboutDialog(XRCDialog):
pass
# Popup Frame for reporting Values
class ReportFrame(XRCFrame):
def __init__(self,msg,*args,**kwds):
XRCFrame.__init__(self,*args,**kwds)
self.getChild("value_text").SetLabel(msg)
- def on_done_button_activate(self,chld):
+ def on_done_button_activate(self,evt):
self.Destroy()
diff --git a/examples/menus.py b/examples/menus.py
index 3abbafb..75c711a 100644
--- a/examples/menus.py
+++ b/examples/menus.py
@@ -1,27 +1,26 @@
from wxPython import wx
from XRCWidgets import XRCApp
class MenuApp(XRCApp):
def on_m_file_exit_activate(self,ctrl):
self.Close()
- def on_m_file_new_doc_activate(self,ctrl):
- print self.getChild("m_file_new_doc").GetLabel()
+ def on_m_file_new_doc_activate(self,evt):
print "NEW DOCUMENT"
- def on_m_file_new_tmpl_activate(self,ctrl):
+ def on_m_file_new_tmpl_activate(self,evt):
print "NEW TEMPLATE"
- def on_m_help_about_activate(self,ctrl):
+ def on_m_help_about_activate(self,evt):
print "SHOWING ABOUT DIALOG..."
def run():
app = MenuApp()
app.MainLoop()
|
rfk/xrcwidgets
|
157c5ea60a8e8c4dc3d8dcb6b5439b49019b460f
|
Erm, not sure actually...
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 9fa1b4a..ba558fe 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,654 +1,662 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
+ print menu, mData.attrs.get("name")
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
+ print "LOOKING FOR MENU ITEM:", lbl
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
+ print "LOOKING FOR MENU:", lbl
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
+ print "FOUND MENU BAR:", menu
+ print menu.GetMenuCount()
+ print menu.FindMenu(lbl)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
- return parent.GetMenuBar()
+ mbar = parent.GetMenuBar()
+ return mbar
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
# TODO: this would be better implemented using a dictionary
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
elif cType == "wxComboBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
elif cType == "wxRadioBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
elif cType == "wxChoice":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
- child = self.getChild(cName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
- wx.EVT_MENU(self,child.GetId(),handler)
+ #child = self.getChild(cName)
+ #handler = lcurry(handler,child)
+ #handler = lcurry(_EvtHandle,handler)
+ cID = self.getChildId(cName)
+ wx.EVT_MENU(self,cID,handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/examples/menus.py b/examples/menus.py
index f7a50bb..3abbafb 100644
--- a/examples/menus.py
+++ b/examples/menus.py
@@ -1,26 +1,27 @@
from wxPython import wx
from XRCWidgets import XRCApp
class MenuApp(XRCApp):
def on_m_file_exit_activate(self,ctrl):
self.Close()
def on_m_file_new_doc_activate(self,ctrl):
+ print self.getChild("m_file_new_doc").GetLabel()
print "NEW DOCUMENT"
def on_m_file_new_tmpl_activate(self,ctrl):
print "NEW TEMPLATE"
def on_m_help_about_activate(self,ctrl):
print "SHOWING ABOUT DIALOG..."
def run():
app = MenuApp()
app.MainLoop()
diff --git a/tools/XRCWidgets-0.1.5.ebuild b/tools/XRCWidgets-0.1.5.ebuild
new file mode 100644
index 0000000..0030004
--- /dev/null
+++ b/tools/XRCWidgets-0.1.5.ebuild
@@ -0,0 +1,23 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
+
+inherit distutils
+
+DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
+SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_5/XRCWidgets-0.1.5.tar.gz"
+HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+LICENSE="wxWinLL-3"
+
+DEPEND=">=dev-lang/python-2.3
+ >=dev-python/wxpython-2.4.2.4"
+
+src_install() {
+ distutils_src_install
+}
+
+
|
rfk/xrcwidgets
|
ab87c79920dd80505be0d4b6483086970a7d3e88
|
Fixing TODO list
|
diff --git a/TODO b/TODO
index ee72f2d..32aad4c 100644
--- a/TODO
+++ b/TODO
@@ -1,8 +1,7 @@
* Implement _getChild for more widget types:
* toolbars
* implement events for the current widget, perhaps using 'self'
- * make XRCApp automatically connect on_self_close to destroy
|
rfk/xrcwidgets
|
753d377c79bdc9fa501491bc6e549cc6734e8644
|
Dont call wx* initialisers in pre-initalisation
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 4780591..9fa1b4a 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -56,606 +56,599 @@ class XRCWidget:
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
# Also remove anything following a tab, as it's an accelerator
# indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
# TODO: this would be better implemented using a dictionary
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
elif cType == "wxComboBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
elif cType == "wxRadioBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
elif cType == "wxChoice":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
- wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
- wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
- wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
- wx.EVT_CLOSE(self,self.OnClose)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
- def OnClose(self,evnt):
- self.Destroy()
-
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
|
rfk/xrcwidgets
|
fd905eac49ee460ce2420d0ce210e436f29db63f
|
Fix to recognise menu items with <tab>Ctrl+O style entries
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index e1ceed8..4780591 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,658 +1,661 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
+ # Also remove anything following a tab, as it's an accelerator
+ # indicator.
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
+ lbl = lbl.split("\t")[0]
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
# TODO: this would be better implemented using a dictionary
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
elif cType == "wxComboBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
elif cType == "wxRadioBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
elif cType == "wxChoice":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
wx.EVT_CLOSE(self,self.OnClose)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
def OnClose(self,evnt):
self.Destroy()
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
|
rfk/xrcwidgets
|
9abd51b772becbf820180c5c5939afda99fc2a24
|
Bumping version number
|
diff --git a/setup.py b/setup.py
index 97a7da7..647af29 100644
--- a/setup.py
+++ b/setup.py
@@ -1,55 +1,55 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
import os
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "1"
-VER_REL = "4"
+VER_REL = "5"
VER_PATCH = ""
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
if eName.endswith(".py") or eName.endswith(".xrc"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
bc3f8dbe333bc1374f205622abea12d286cf1c5b
|
Fix retrieval of menus with underscores
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 935d46f..e1ceed8 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,655 +1,658 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
+ lblParts = lbl.split("_")
+ if len(lblParts) == 2:
+ lbl = "".join(lblParts)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
# TODO: this would be better implemented using a dictionary
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
elif cType == "wxComboBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
elif cType == "wxRadioBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
elif cType == "wxChoice":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
wx.EVT_CLOSE(self,self.OnClose)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
def OnClose(self,evnt):
self.Destroy()
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
|
rfk/xrcwidgets
|
e13c6596177cfca8cb7fa49fc0e4fde17a631ca5
|
*** empty log message ***
|
diff --git a/examples/simple.py b/examples/simple.py
index 8143724..4e0c324 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -1,20 +1,19 @@
from wxPython import wx
from XRCWidgets import XRCApp
class SimpleApp(XRCApp):
def on_message_change(self,msg):
print "MESSAGE IS NOW:", msg.GetValue()
def on_ok_activate(self,bttn):
print self.getChild("message").GetValue()
-
def run():
app = SimpleApp()
app.MainLoop()
|
rfk/xrcwidgets
|
88c7b41d215be8f4d047d777bdedded965b1f70f
|
Small tweaks
|
diff --git a/TODO b/TODO
index bde8a95..ee72f2d 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,8 @@
* Implement _getChild for more widget types:
* toolbars
+ * implement events for the current widget, perhaps using 'self'
+ * make XRCApp automatically connect on_self_close to destroy
+
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index f24f6c3..935d46f 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -108,544 +108,548 @@ class XRCWidget:
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
# TODO: this would be better implemented using a dictionary
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
elif cType == "wxComboBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
elif cType == "wxRadioBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
elif cType == "wxChoice":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHOICE(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
+ wx.EVT_CLOSE(self,self.OnClose)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
+ def OnClose(self,evnt):
+ self.Destroy()
+
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
|
rfk/xrcwidgets
|
0d0162a772a65489b1cfbfbcd369e924f87b54ea
|
Removed xml "encoding" attribute, which was causes a nuisance dialog on app startup. Naughty, but hey - they're only examples.
|
diff --git a/examples/demo.xrc b/examples/demo.xrc
index 1e5a4a7..6bc063d 100644
--- a/examples/demo.xrc
+++ b/examples/demo.xrc
@@ -1,99 +1,99 @@
-<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<?xml version="1.0" ?>
<!-- generated by wxGlade 0.3.3 on Thu Jul 1 23:28:13 2004 -->
<resource version="2.3.0.1">
<object class="wxDialog" name="about">
<centered>1</centered>
<style>wxDIALOG_MODAL|wxCAPTION|wxRESIZE_BORDER|wxTHICK_FRAME|wxSTAY_ON_TOP</style>
<size>360, 230</size>
<title>About XRCWidgets...</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_1">
<label>XRCWidgets</label>
<font>
<style>normal</style>
<family>default</family>
<weight>normal</weight>
<underlined>1</underlined>
<size>17</size>
</font>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxTextCtrl" name="about_data">
<style>wxTE_MULTILINE|wxTE_READONLY</style>
<value>\nA Rapid GUI Development framework by Ryan Kelly.\n\nhttp://www.rfk.id.au/software/projects/XRCWidgets/\n\[email protected]</value>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="wxFrame" name="DemoApp">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>XRCWidgets Demonstration</title>
<object class="wxMenuBar" name="DemoFrame_menubar">
<object class="wxMenu" name="m_file">
<label>_File</label>
<object class="wxMenuItem" name="m_file_new">
<label>_New</label>
</object>
<object class="wxMenuItem" name="m_file_exit">
<label>E_xit</label>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>_Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>_About...</label>
</object>
</object>
</object>
<object class="wxToolBar" name="DemoFrame_toolbar">
<style>wxTB_TEXT|wxTB_NOICONS|wxTB_HORIZONTAL</style>
<object class="tool" name="tb_new">
<label>New</label>
</object>
<object class="tool" name="tb_about">
<label>About</label>
</object>
</object>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxADJUST_MINSIZE</flag>
<object class="wxPanel" name="displayarea">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticText" name="label_3">
<label>Display Goes Here</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/demo_widgets.xrc b/examples/demo_widgets.xrc
index 1130ce6..c34e325 100644
--- a/examples/demo_widgets.xrc
+++ b/examples/demo_widgets.xrc
@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<?xml version="1.0" ?>
<!-- generated by wxGlade 0.3.3 on Thu Jul 1 23:08:11 2004 -->
<resource version="2.3.0.1">
<object class="wxPanel" name="DemoPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxTextCtrl" name="val1">
<style>wxTE_PROCESS_ENTER</style>
</object>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_2">
<label> + </label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxTextCtrl" name="val2">
<style>wxTE_PROCESS_ENTER</style>
</object>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxStaticText" name="label_3">
<label> = </label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxTextCtrl" name="result">
<style>wxTE_READONLY</style>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>5</border>
<object class="wxButton" name="add">
<label>Add</label>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/everything.xrc b/examples/everything.xrc
index 20b764a..7872548 100644
--- a/examples/everything.xrc
+++ b/examples/everything.xrc
@@ -1,271 +1,271 @@
-<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<?xml version="1.0" ?>
<!-- generated by wxGlade 0.3.4 on Sun Sep 12 23:26:19 2004 -->
<resource version="2.3.0.1">
<object class="wxFrame" name="MainFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>The App with Everything!</title>
<object class="wxMenuBar" name="MainFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
<help>Exit the Application</help>
</object>
</object>
<object class="wxMenu" name="m_edit">
<label>Edit</label>
<object class="wxMenuItem" name="m_edit_tb">
<label>Allow Textbox Editing</label>
<checkable>1</checkable>
</object>
<object class="wxMenuItem" name="m_edit_reporttb">
<label>Report Textbox Contents</label>
<radio>1</radio>
</object>
<object class="wxMenuItem" name="m_edit_reportcb">
<label>Report ComboBox Contents</label>
<radio>1</radio>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>About...</label>
<help>Show About Dialog</help>
</object>
</object>
</object>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL</flag>
<border>5</border>
<object class="wxButton" name="button">
<label>Button</label>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxTextCtrl" name="text_ctrl">
<style>wxTE_PROCESS_ENTER</style>
<value>Text Ctrl</value>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxStaticText" name="static_text">
<label>Static Text</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxComboBox" name="combo_box">
<selection>0</selection>
<content>
<item>Combo Box</item>
<item>Option 2</item>
<item>Option 3</item>
</content>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxEXPAND</flag>
<border>10</border>
<object class="wxListBox" name="list_box">
<style>wxLB_SINGLE</style>
<selection>0</selection>
<content>
<item>List Box</item>
<item>Option 1</item>
<item>Option 2</item>
</content>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxADJUST_MINSIZE</flag>
<object class="wxPanel" name="select_panel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticText" name="label_1">
<label>SelectPanel Goes Here</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="wxPanel" name="SelectPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>5</border>
<object class="wxCheckBox" name="checkbox">
<label>Checkbox</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>3</border>
<object class="wxRadioBox" name="radio_box">
<content>
<item>Option 1 </item>
<item>Option 2 </item>
<item>Option 3 </item>
</content>
<style>wxRA_SPECIFY_COLS</style>
<selection>0</selection>
<dimension>1</dimension>
<label>Radio Box</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>10</border>
<object class="wxChoice" name="choice">
<selection>0</selection>
<content>
<item>Choice</item>
<item>Option 2</item>
<item>Option 3</item>
</content>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="wxFrame" name="ReportFrame">
<style>wxCAPTION|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSTAY_ON_TOP|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
<title>Reporting Your Value...</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>20</border>
<object class="wxStaticText" name="label_3">
<label>The Value Is:</label>
<font>
<style>normal</style>
<family>default</family>
<weight>normal</weight>
<underlined>0</underlined>
<size>10</size>
</font>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag>
<border>5</border>
<object class="wxStaticText" name="value_text">
<label>Value Displayed Here</label>
<font>
<style>italic</style>
<family>default</family>
<weight>bold</weight>
<underlined>0</underlined>
<size>20</size>
</font>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>15</border>
<object class="wxButton" name="done_button">
<default>1</default>
<label>Done</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="wxDialog" name="AboutDialog">
<style>wxDEFAULT_DIALOG_STYLE</style>
<title>About this App</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_2">
<label>The Everything App</label>
<font>
<style>normal</style>
<family>default</family>
<weight>bold</weight>
<underlined>0</underlined>
<size>15</size>
</font>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxTextCtrl" name="text_ctrl_1">
<style>wxTE_MULTILINE|wxTE_LINEWRAP</style>
<value>This is a do-nothing application designed to showcase the functionality available in the XRCWidgets toolkit.</value>
<size>200, 200</size>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/menus.xrc b/examples/menus.xrc
index f16dd28..cf829c1 100644
--- a/examples/menus.xrc
+++ b/examples/menus.xrc
@@ -1,37 +1,37 @@
-<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<?xml version="1.0" ?>
<!-- generated by wxGlade 0.3.3 on Thu Jul 1 22:12:47 2004 -->
<resource version="2.3.0.1">
<object class="wxFrame" name="MenuApp" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>Frame with Menus</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
</object>
</object>
<object class="wxMenuBar" name="MenuFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
<object class="wxMenu" name="m_file_new">
<label>New</label>
<object class="wxMenuItem" name="m_file_new_doc">
<label>Document</label>
</object>
<object class="wxMenuItem" name="m_file_new_tmpl">
<label>Template</label>
</object>
</object>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>About...</label>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/simple.xrc b/examples/simple.xrc
index 9a5e97f..0ef3fe7 100644
--- a/examples/simple.xrc
+++ b/examples/simple.xrc
@@ -1,58 +1,58 @@
-<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<?xml version="1.0"?>
<!-- generated by wxGlade 0.3.3 on Wed Jun 30 19:26:15 2004 -->
<resource version="2.3.0.1">
<object class="wxFrame" name="SimpleApp">
<style>wxDEFAULT_FRAME_STYLE</style>
<size>300, 120</size>
<title>Simple Frame</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxPanel" name="panel_1">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_1">
<label>Message: </label>
</object>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxTextCtrl" name="message">
<style>wxTE_PROCESS_ENTER</style>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxButton" name="ok">
<label>OK</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
|
rfk/xrcwidgets
|
278daf5972b4bd38769b0356e979e171a57f5698
|
Small fixes.
|
diff --git a/tools/XRCWidgets-0.1.4.ebuild b/tools/XRCWidgets-0.1.4.ebuild
index 56adbd2..1b9f8cd 100644
--- a/tools/XRCWidgets-0.1.4.ebuild
+++ b/tools/XRCWidgets-0.1.4.ebuild
@@ -1,28 +1,23 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
inherit distutils
DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_4/XRCWidgets-0.1.4.tar.gz"
HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
IUSE=""
SLOT="0"
-KEYWORDS="~x86"
+KEYWORDS="~x86 ~amd64"
LICENSE="wxWinLL-3"
DEPEND=">=dev-lang/python-2.3
>=dev-python/wxpython-2.4.2.4"
src_install() {
-
distutils_src_install
- distutils_python_version
-
}
-
-
|
rfk/xrcwidgets
|
ce49acff42df1f864539060b258cb5bf69f1f28d
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 33303cf..f24f6c3 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,640 +1,651 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
+ # TODO: this would be better implemented using a dictionary
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
elif cType == "wxComboBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
+ elif cType == "wxRadioBox":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_RADIOBOX(self,self.getChildId(cName),handler)
+ elif cType == "wxChoice":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_CHOICE(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
elif cType == "wxListBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/examples/everything.py b/examples/everything.py
index b0fa55c..5a7e974 100644
--- a/examples/everything.py
+++ b/examples/everything.py
@@ -1,82 +1,110 @@
+#
+# everything.py - large, useless app for demonstrating the functionality
+# of the XRCWidgets toolkit
+#
from XRCWidgets import XRCApp, XRCDialog, XRCFrame, XRCPanel
def run():
app = MainFrame()
app.MainLoop()
+# The main application window
class MainFrame(XRCApp):
def __init__(self,*args,**kwds):
XRCApp.__init__(self,*args,**kwds)
# Internal boolean for radio menu items
self._reportTB = False
# Set menus to initial values
self.getChild("m_edit_reportcb").Check()
self.getChild("m_edit_tb").Check()
# Popup report frame showing message
def report(self,msg):
- print msg
+ frm = ReportFrame(msg,self)
+ frm.Show()
# Show a SelectPanel inside the desired panel
def on_select_panel_content(self,parent):
return SelectPanel(parent)
# Quit application when "Exit" is selected
def on_m_file_exit_activate(self,chld):
self.Close(True)
# Popup the about dialog from the help menu item
def on_m_help_about_activate(self,chld):
dlg = AboutDialog(self)
dlg.ShowModal()
# Switch reporting modes on/off with activations
def on_m_edit_reporttb_activate(self,chld):
self._reportTB = True
def on_m_edit_reportcb_activate(self,chld):
self._reportTB = False
# Enable/Disable editing of textbox contents
def on_m_edit_tb_activate(self,chld):
self.getChild("text_ctrl").Enable(chld.IsChecked())
# Report value of textbox or combobox when button clicked
def on_button_activate(self,chld):
if self._reportTB:
self.report(self.getChild("text_ctrl").GetValue())
else:
self.report(self.getChild("combo_box").GetValue())
# Print out new values when textbox or combobox change
def on_text_ctrl_change(self,chld):
print "TEXTBOX NOW CONTAINS:", chld.GetValue()
def on_combo_box_change(self,chld):
print "COMBOBOX NOW CONTAINS:", chld.GetValue()
# Print out selected value in listbox when changed
def on_list_box_change(self,chld):
print "LISTBOX HAS SELECTED:", chld.GetStringSelection()
# An report it when it is double-clicked
def on_list_box_activate(self,chld):
self.report(chld.GetStringSelection())
+
+# Panel containing some additional widgets
class SelectPanel(XRCPanel):
def __init__(self,*args,**kwds):
XRCPanel.__init__(self,*args,**kwds)
self.getChild("checkbox").SetValue(True)
# Use checkbox to enable/disable radio buttons
def on_checkbox_change(self,chld):
self.getChild("radio_box").Enable(chld.IsChecked())
+ # Print radiobox selections to the screen
+ def on_radio_box_change(self,chld):
+ print "RADIOBOX HAS SELECTED:", chld.GetStringSelection()
+
+ # Simialr for the wxChoice
+ def on_choice_change(self,chld):
+ print "CHOICE HAS SELECTED:", chld.GetStringSelection()
+
+# Simple static about dialog
class AboutDialog(XRCDialog):
pass
+# Popup Frame for reporting Values
+class ReportFrame(XRCFrame):
+
+ def __init__(self,msg,*args,**kwds):
+ XRCFrame.__init__(self,*args,**kwds)
+ self.getChild("value_text").SetLabel(msg)
+
+ def on_done_button_activate(self,chld):
+ self.Destroy()
+
+
diff --git a/examples/everything.xrc b/examples/everything.xrc
index 40736fc..20b764a 100644
--- a/examples/everything.xrc
+++ b/examples/everything.xrc
@@ -1,212 +1,271 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
-<!-- generated by wxGlade 0.3.4 on Sun Sep 12 22:14:50 2004 -->
+<!-- generated by wxGlade 0.3.4 on Sun Sep 12 23:26:19 2004 -->
<resource version="2.3.0.1">
<object class="wxFrame" name="MainFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>The App with Everything!</title>
<object class="wxMenuBar" name="MainFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
<help>Exit the Application</help>
</object>
</object>
<object class="wxMenu" name="m_edit">
<label>Edit</label>
<object class="wxMenuItem" name="m_edit_tb">
<label>Allow Textbox Editing</label>
<checkable>1</checkable>
</object>
<object class="wxMenuItem" name="m_edit_reporttb">
<label>Report Textbox Contents</label>
<radio>1</radio>
</object>
<object class="wxMenuItem" name="m_edit_reportcb">
<label>Report ComboBox Contents</label>
<radio>1</radio>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>About...</label>
<help>Show About Dialog</help>
</object>
</object>
</object>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL</flag>
<border>5</border>
<object class="wxButton" name="button">
<label>Button</label>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALL</flag>
<border>5</border>
<object class="wxTextCtrl" name="text_ctrl">
<style>wxTE_PROCESS_ENTER</style>
<value>Text Ctrl</value>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxStaticText" name="static_text">
<label>Static Text</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>5</border>
<object class="wxComboBox" name="combo_box">
<selection>0</selection>
<content>
<item>Combo Box</item>
<item>Option 2</item>
<item>Option 3</item>
</content>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxEXPAND</flag>
<border>10</border>
<object class="wxListBox" name="list_box">
<style>wxLB_SINGLE</style>
<selection>0</selection>
<content>
<item>List Box</item>
<item>Option 1</item>
<item>Option 2</item>
</content>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxADJUST_MINSIZE</flag>
<object class="wxPanel" name="select_panel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticText" name="label_1">
<label>SelectPanel Goes Here</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="wxPanel" name="SelectPanel">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>5</border>
<object class="wxCheckBox" name="checkbox">
<label>Checkbox</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>3</border>
<object class="wxRadioBox" name="radio_box">
<content>
<item>Option 1 </item>
<item>Option 2 </item>
<item>Option 3 </item>
</content>
<style>wxRA_SPECIFY_COLS</style>
<selection>0</selection>
<dimension>1</dimension>
<label>Radio Box</label>
</object>
</object>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>10</border>
<object class="wxChoice" name="choice">
<selection>0</selection>
<content>
<item>Choice</item>
<item>Option 2</item>
<item>Option 3</item>
</content>
</object>
</object>
</object>
</object>
</object>
</object>
+ <object class="wxFrame" name="ReportFrame">
+ <style>wxCAPTION|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxSTAY_ON_TOP|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
+ <title>Reporting Your Value...</title>
+ <object class="wxPanel">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_HORIZONTAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>20</border>
+ <object class="wxStaticText" name="label_3">
+ <label>The Value Is:</label>
+ <font>
+ <style>normal</style>
+ <family>default</family>
+ <weight>normal</weight>
+ <underlined>0</underlined>
+ <size>10</size>
+ </font>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL|wxADJUST_MINSIZE</flag>
+ <border>5</border>
+ <object class="wxStaticText" name="value_text">
+ <label>Value Displayed Here</label>
+ <font>
+ <style>italic</style>
+ <family>default</family>
+ <weight>bold</weight>
+ <underlined>0</underlined>
+ <size>20</size>
+ </font>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>15</border>
+ <object class="wxButton" name="done_button">
+ <default>1</default>
+ <label>Done</label>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
<object class="wxDialog" name="AboutDialog">
<style>wxDEFAULT_DIALOG_STYLE</style>
<title>About this App</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_2">
<label>The Everything App</label>
<font>
<style>normal</style>
<family>default</family>
<weight>bold</weight>
<underlined>0</underlined>
<size>15</size>
</font>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxTextCtrl" name="text_ctrl_1">
<style>wxTE_MULTILINE|wxTE_LINEWRAP</style>
<value>This is a do-nothing application designed to showcase the functionality available in the XRCWidgets toolkit.</value>
<size>200, 200</size>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/tools/XRCWidgets-0.1.1_alpha1.ebuild b/tools/XRCWidgets-0.1.1_alpha1.ebuild
deleted file mode 100644
index 6786a81..0000000
--- a/tools/XRCWidgets-0.1.1_alpha1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
-
-inherit distutils
-
-DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
-SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_1_alpha1/XRCWidgets-0.1.1_alpha1.tar.gz"
-HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
-
-IUSE=""
-SLOT="0"
-KEYWORDS="~x86"
-LICENSE="wxWinLL-3"
-
-DEPEND=">=dev-lang/python-2.3
- >=dev-python/wxPython-2.4.2.4"
-
-src_install() {
-
- distutils_src_install
- distutils_python_version
-
-}
-
-
-
-
diff --git a/tools/XRCWidgets-0.1.2_alpha1.ebuild b/tools/XRCWidgets-0.1.2_alpha1.ebuild
deleted file mode 100644
index c1f4450..0000000
--- a/tools/XRCWidgets-0.1.2_alpha1.ebuild
+++ /dev/null
@@ -1,28 +0,0 @@
-# Copyright 2004, Ryan Kelly
-# Released under the terms of the wxWindows Licence, version 3.
-# See the file 'lincence/preamble.txt' in the main distribution for details.
-
-inherit distutils
-
-DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
-SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_2_alpha1/XRCWidgets-0.1.2_alpha1.tar.gz"
-HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
-
-IUSE=""
-SLOT="0"
-KEYWORDS="~x86"
-LICENSE="wxWinLL-3"
-
-DEPEND=">=dev-lang/python-2.3
- >=dev-python/wxPython-2.4.2.4"
-
-src_install() {
-
- distutils_src_install
- distutils_python_version
-
-}
-
-
-
-
diff --git a/tools/XRCWidgets-0.1.3.ebuild b/tools/XRCWidgets-0.1.4.ebuild
similarity index 95%
rename from tools/XRCWidgets-0.1.3.ebuild
rename to tools/XRCWidgets-0.1.4.ebuild
index 823855a..56adbd2 100644
--- a/tools/XRCWidgets-0.1.3.ebuild
+++ b/tools/XRCWidgets-0.1.4.ebuild
@@ -1,28 +1,28 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
inherit distutils
DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
-SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_3/XRCWidgets-0.1.3.tar.gz"
+SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_4/XRCWidgets-0.1.4.tar.gz"
HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
IUSE=""
SLOT="0"
KEYWORDS="~x86"
LICENSE="wxWinLL-3"
DEPEND=">=dev-lang/python-2.3
>=dev-python/wxpython-2.4.2.4"
src_install() {
distutils_src_install
distutils_python_version
}
|
rfk/xrcwidgets
|
50714b9abe99685afeb39045c7b389b6599cd301
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 0aa066f..33303cf 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,623 +1,640 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
-from utils import lcurry, XMLDocTree, XMLElementData
+from XRCWidgets.utils import lcurry, XMLDocTree, XMLElementData
# The following seems to work around a wxWidgets bug which is making
# XRCApp segfault, simply by creating a PySimpleApp.
from wxPython import wx as wx2
_WorkAround_app = wx2.wxPySimpleApp(0)
del _WorkAround_app
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
+
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
+ elif cType == "wxListBox":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_LISTBOX(self,self.getChildId(cName),handler)
+ elif cType == "wxComboBox":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_COMBOBOX(self,self.getChildId(cName),handler)
+ wx.EVT_TEXT_ENTER(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
+ elif cType == "wxListBox":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_LISTBOX_DCLICK(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCApp(XRCFrame):
"""XRCFrame that can act as a standalone application.
This class provides a convient way to specify the main frame of
an application. It is equivalent to an XRCFrame, but provides
the following additional methods:
* MainLoop/ExitMainLoop
It thus behaves as a simple combination of a wx.Frame and a wx.App, with
the frame coming from the XRC file and being the TopLevelWindow of
the application.
"""
def __init__(self,*args,**kwds):
parent = None
XRCFrame.__init__(self,parent,*args,**kwds)
self.__app = wx.PySimpleApp(0)
self.__app.SetTopWindow(self)
def MainLoop(self):
self.Show()
self.__app.MainLoop()
def ExitMainLoop(self):
self.__app.ExitMainLoop()
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/examples/everything.py b/examples/everything.py
new file mode 100644
index 0000000..b0fa55c
--- /dev/null
+++ b/examples/everything.py
@@ -0,0 +1,82 @@
+
+from XRCWidgets import XRCApp, XRCDialog, XRCFrame, XRCPanel
+
+
+
+def run():
+ app = MainFrame()
+ app.MainLoop()
+
+
+class MainFrame(XRCApp):
+
+ def __init__(self,*args,**kwds):
+ XRCApp.__init__(self,*args,**kwds)
+ # Internal boolean for radio menu items
+ self._reportTB = False
+ # Set menus to initial values
+ self.getChild("m_edit_reportcb").Check()
+ self.getChild("m_edit_tb").Check()
+
+ # Popup report frame showing message
+ def report(self,msg):
+ print msg
+
+ # Show a SelectPanel inside the desired panel
+ def on_select_panel_content(self,parent):
+ return SelectPanel(parent)
+
+ # Quit application when "Exit" is selected
+ def on_m_file_exit_activate(self,chld):
+ self.Close(True)
+
+ # Popup the about dialog from the help menu item
+ def on_m_help_about_activate(self,chld):
+ dlg = AboutDialog(self)
+ dlg.ShowModal()
+
+ # Switch reporting modes on/off with activations
+ def on_m_edit_reporttb_activate(self,chld):
+ self._reportTB = True
+ def on_m_edit_reportcb_activate(self,chld):
+ self._reportTB = False
+
+ # Enable/Disable editing of textbox contents
+ def on_m_edit_tb_activate(self,chld):
+ self.getChild("text_ctrl").Enable(chld.IsChecked())
+
+ # Report value of textbox or combobox when button clicked
+ def on_button_activate(self,chld):
+ if self._reportTB:
+ self.report(self.getChild("text_ctrl").GetValue())
+ else:
+ self.report(self.getChild("combo_box").GetValue())
+
+ # Print out new values when textbox or combobox change
+ def on_text_ctrl_change(self,chld):
+ print "TEXTBOX NOW CONTAINS:", chld.GetValue()
+ def on_combo_box_change(self,chld):
+ print "COMBOBOX NOW CONTAINS:", chld.GetValue()
+
+ # Print out selected value in listbox when changed
+ def on_list_box_change(self,chld):
+ print "LISTBOX HAS SELECTED:", chld.GetStringSelection()
+ # An report it when it is double-clicked
+ def on_list_box_activate(self,chld):
+ self.report(chld.GetStringSelection())
+
+class SelectPanel(XRCPanel):
+
+ def __init__(self,*args,**kwds):
+ XRCPanel.__init__(self,*args,**kwds)
+ self.getChild("checkbox").SetValue(True)
+
+ # Use checkbox to enable/disable radio buttons
+ def on_checkbox_change(self,chld):
+ self.getChild("radio_box").Enable(chld.IsChecked())
+
+
+class AboutDialog(XRCDialog):
+ pass
+
+
diff --git a/examples/everything.xrc b/examples/everything.xrc
new file mode 100644
index 0000000..40736fc
--- /dev/null
+++ b/examples/everything.xrc
@@ -0,0 +1,212 @@
+<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<!-- generated by wxGlade 0.3.4 on Sun Sep 12 22:14:50 2004 -->
+
+<resource version="2.3.0.1">
+ <object class="wxFrame" name="MainFrame">
+ <style>wxDEFAULT_FRAME_STYLE</style>
+ <title>The App with Everything!</title>
+ <object class="wxMenuBar" name="MainFrame_menubar">
+ <object class="wxMenu" name="m_file">
+ <label>File</label>
+ <object class="wxMenuItem" name="m_file_exit">
+ <label>Exit</label>
+ <help>Exit the Application</help>
+ </object>
+ </object>
+ <object class="wxMenu" name="m_edit">
+ <label>Edit</label>
+ <object class="wxMenuItem" name="m_edit_tb">
+ <label>Allow Textbox Editing</label>
+ <checkable>1</checkable>
+ </object>
+ <object class="wxMenuItem" name="m_edit_reporttb">
+ <label>Report Textbox Contents</label>
+ <radio>1</radio>
+ </object>
+ <object class="wxMenuItem" name="m_edit_reportcb">
+ <label>Report ComboBox Contents</label>
+ <radio>1</radio>
+ </object>
+ </object>
+ <object class="wxMenu" name="m_help">
+ <label>Help</label>
+ <object class="wxMenuItem" name="m_help_about">
+ <label>About...</label>
+ <help>Show About Dialog</help>
+ </object>
+ </object>
+ </object>
+ <object class="wxPanel">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND</flag>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <flag>wxEXPAND</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL</flag>
+ <border>5</border>
+ <object class="wxButton" name="button">
+ <label>Button</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALL</flag>
+ <border>5</border>
+ <object class="wxTextCtrl" name="text_ctrl">
+ <style>wxTE_PROCESS_ENTER</style>
+ <value>Text Ctrl</value>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ <object class="wxStaticText" name="static_text">
+ <label>Static Text</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ <object class="wxComboBox" name="combo_box">
+ <selection>0</selection>
+ <content>
+ <item>Combo Box</item>
+ <item>Option 2</item>
+ <item>Option 3</item>
+ </content>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxEXPAND</flag>
+ <border>10</border>
+ <object class="wxListBox" name="list_box">
+ <style>wxLB_SINGLE</style>
+ <selection>0</selection>
+ <content>
+ <item>List Box</item>
+ <item>Option 1</item>
+ <item>Option 2</item>
+ </content>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND|wxADJUST_MINSIZE</flag>
+ <object class="wxPanel" name="select_panel">
+ <style>wxTAB_TRAVERSAL</style>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="label_1">
+ <label>SelectPanel Goes Here</label>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="wxPanel" name="SelectPanel">
+ <style>wxTAB_TRAVERSAL</style>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>5</border>
+ <object class="wxCheckBox" name="checkbox">
+ <label>Checkbox</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>3</border>
+ <object class="wxRadioBox" name="radio_box">
+ <content>
+ <item>Option 1 </item>
+ <item>Option 2 </item>
+ <item>Option 3 </item>
+ </content>
+ <style>wxRA_SPECIFY_COLS</style>
+ <selection>0</selection>
+ <dimension>1</dimension>
+ <label>Radio Box</label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>10</border>
+ <object class="wxChoice" name="choice">
+ <selection>0</selection>
+ <content>
+ <item>Choice</item>
+ <item>Option 2</item>
+ <item>Option 3</item>
+ </content>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="wxDialog" name="AboutDialog">
+ <style>wxDEFAULT_DIALOG_STYLE</style>
+ <title>About this App</title>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>10</border>
+ <object class="wxStaticText" name="label_2">
+ <label>The Everything App</label>
+ <font>
+ <style>normal</style>
+ <family>default</family>
+ <weight>bold</weight>
+ <underlined>0</underlined>
+ <size>15</size>
+ </font>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>10</border>
+ <object class="wxTextCtrl" name="text_ctrl_1">
+ <style>wxTE_MULTILINE|wxTE_LINEWRAP</style>
+ <value>This is a do-nothing application designed to showcase the functionality available in the XRCWidgets toolkit.</value>
+ <size>200, 200</size>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</resource>
|
rfk/xrcwidgets
|
251270b75d88d65cb4584dbea753ed2c3c3f4551
|
*** empty log message ***
|
diff --git a/docs/Makefile b/docs/Makefile
new file mode 100644
index 0000000..81d3727
--- /dev/null
+++ b/docs/Makefile
@@ -0,0 +1,96 @@
+
+#
+# Simple wrapper Makefile to produce documentation from LyX/LaTeX
+#
+
+## Macro Definitions
+#
+# The following define the programs to use to generate various documentation
+# types, as follows:
+#
+# * HTML: latex2html
+# * PostScript: dvips
+# * PDF: dvipdf
+#
+# Command-line options can be added/changed here, or other software with a
+# compatible interface can be substituted.
+
+L2H = latex2html -split 0 -show_section_numbers -toc_depth 5 -ascii_mode -images
+DVIPS = dvips
+DVIPDF = dvipdf
+L2RTF = latex2rtf
+
+
+## File Lists
+## Adjust $GARBAGE to add extra files for deletion in `make clean`
+
+GRAPHICS = SimpleFrame.eps
+
+LATEX_GARBAGE = *.aux *.lof *.dvi *.log *.toc *.lot
+GARBAGE = $(LATEX_GARBAGE) *~
+
+
+PS = manual.ps
+PDF = manual.pdf
+RTF = # List of RTF Files
+HTML = # List HTML Files
+
+
+## Basic Dependencies
+
+# Default target makes all doc types
+all: ps pdf html rtf
+
+ps: $(PS)
+pdf: $(PDF)
+html: $(HTML)
+rtf: $(RTF)
+
+#
+# Export graphics from various file formats into EPS for easy inclusion
+
+%.eps: %.dia
+ dia -e $@ $<
+
+%.eps: %.jpg
+ convert $< $@
+
+%.eps: %.png
+ convert $< $@
+
+
+# Export from LyX to LaTeX
+%.tex: %.lyx
+ lyx -e latex $<
+
+# Run LaTeX a few times to generate DVI file
+%.dvi: %.tex $(GRAPHICS)
+ latex $<
+ latex $<
+ latex $<
+ latex $<
+
+
+# DVI converters for different formats
+%.ps: %.dvi
+ $(DVIPS) -o $@ $<
+
+%.pdf: %.dvi
+ $(DVIPDF) $< $@
+
+%/index.html: %.tex
+ $(L2H) $<
+
+%.rtf: %.dvi
+ $(L2RTF) $*.tex
+
+
+## Cleanup Commands
+
+clean:
+ rm -rf $(GARBAGE)
+
+clobber: clean
+ rm -rf $(PDF) $(PS) $(HTML) $(RTF)
+
+
diff --git a/docs/SimpleFrame.png b/docs/SimpleFrame.png
new file mode 100644
index 0000000..f9d3ba8
Binary files /dev/null and b/docs/SimpleFrame.png differ
diff --git a/docs/manual.lyx b/docs/manual.lyx
index 843cab7..9b892ef 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,514 +1,528 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
\layout Standard
This document is Copyright 2004, Ryan Kelly.
- Unrestricted verbatim copies may be made and distributed.
+ Verbatim copies may be made and distributed without restriction.
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
\layout Subsection
Underlying Technologies
\layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
\newline
http://www.wxwidgets.org/
\layout Itemize
wxPython is a wxWidgets binding for the Python language
\newline
http://www.wxPython.org
\layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
\layout Subsection
Purpose
\layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
\layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
XRCWidgets, and if final versions require greater efficiency than the toolkit
can provide it is a simple matter to convert the XRC files into Python
or C++ code.
\layout Subsection
Advantages
\layout Subsubsection
Rapid GUI Development
\layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
the rest of the application.
\layout Subsubsection
Declarative Event Handling
\layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
\layout Subsubsection
Separation of Layout from Code
\layout Standard
-Rapid GUI development is also possible using designers that directly output
- Python or C++ code.
+Rapid GUI development is also possible using design applications that directly
+ output Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
n and almost impossible to reverse-engineer the code for further editing.
\layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
\layout Subsubsection
Easy Conversion to Native Code
\layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
\layout Subsubsection
Compatibility with Standard wxPython Code
\layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
collection of child widgets created and event handlers connected as it
is initialised.
\layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
\layout Subsubsection
Simple Re-sizing of GUI
\layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
\layout Section
Classes Provided
\layout Standard
The classes provided by the XRCWidgets framework are detailed below.
\layout Subsection
XRCWidgetsError
\layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
\layout Subsection
XRCWidget
\layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
\layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
\layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
\layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
\layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
\layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
\layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
\layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
\layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
\layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
\end_inset
replaceInChild
\begin_inset Quotes erd
\end_inset
in the constructor
\layout Subsection
XRCPanel
\layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCDialog
\layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCFrame
\layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
+\layout Subsection
+
+XRCApp
+\layout Standard
+
+XRCFrame inherits from XRCFrame and is designed to provide a shortcut for
+ specifying the main frame of an application.
+ It provides the methods
+\begin_inset Quotes eld
+\end_inset
+
+MainLoop
+\begin_inset Quotes erd
+\end_inset
+
+ and
+\begin_inset Quotes eld
+\end_inset
+
+EndMainLoop
+\begin_inset Quotes erd
+\end_inset
+
+ mirroring those of the wxApp class.
+ When created, it creates a private wxApp class and makes itself the top-level
+ window for the application.
\layout Section
Tutorials
\layout Standard
The following are a number of quick tutorials to get you started using the
framework.
The code for these tutorials can be found in the 'examles' directory of
the source distribution.
\layout Subsection
The Basics
\layout Standard
-This section provides a quick tutorial for creating a widget using the XRCWidget
-s framework.
- The widget in question is to be called 'SimpleFrame', and will live in
- the file 'simple.py'.
+This section provides a quick tutorial for creating an appliction using
+ the XRCWidgets framework.
+ The application will consist of a single widget called 'SimpleApp', and
+ will live in the file 'simple.py'.
It will consist of a wxFrame with a text-box and a button, which prints
a message to the terminal when the button is clicked.
The frame will look something like this:
\layout Standard
\added_space_top smallskip \added_space_bottom smallskip \align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
\end_inset
\layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
\layout Subsubsection
Creating the XRC File
\layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
\layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
\layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
\end_inset
Add a Frame
\begin_inset Quotes erd
\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
\end_inset
-SimpleFrame
+SimpleApp
\begin_inset Quotes erd
\end_inset
- this is to correspond to the name of the class that is to be created.
\layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
and a button named
\begin_inset Quotes eld
\end_inset
ok
\begin_inset Quotes erd
\end_inset
.
\layout Standard
When the frame is finished, selected Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
\end_inset
xrc2wxg
\begin_inset Quotes erd
\end_inset
which can convert from the XRC file to a wxGlade project file.
\layout Subsubsection
Creating the Python Code
\layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
\layout Standard
Next, create the python file 'simple.py' using the following code:
\layout LyX-Code
-from XRCWidgets import XRCFrame
+from XRCWidgets import XRCApp
\layout LyX-Code
-class SimpleFrame(XRCFrame):
+class SimpleApp(XRCApp):
\layout LyX-Code
def on_message_change(self,msg):
\layout LyX-Code
print
\begin_inset Quotes eld
\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
\end_inset
, msg.GetValue()
\layout LyX-Code
def on_ok_activate(self,bttn):
\layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
).GetValue()
\layout Standard
-This code is all that is required to make a functioning frame.
+This code is all that is required to make a functioning application.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
\end_inset
on_message_change
\begin_inset Quotes erd
\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
\end_inset
on_ok_activate
\begin_inset Quotes erd
\end_inset
will be called whenever the button is clicked.
\layout Subsubsection
Testing the Widget
\layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
\layout LyX-Code
-from simple import SimpleFrame
-\layout LyX-Code
-
-from wxPython.wx import *
-\layout LyX-Code
-
-app = wxPySimpleApp(0)
-\layout LyX-Code
-
-frame = SimpleFrame(None)
-\layout LyX-Code
-
-app.SetTopWindow(frame)
+from simple import SimpleApp
\layout LyX-Code
-frame.Show()
+app = SimpleApp()
\layout LyX-Code
app.MainLoop()
\layout Standard
-This code imports the widget's definition, creates a wxPython application,
- and runs it using SimpleFrame as its top level window.
+This code imports the widget's definition, creates the application and runs
+ the event loop.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
\layout Subsection
A more complicated Frame
\layout Standard
This tutorial is yet to be completed.
See the files 'menus.py' and menus.xrc' in the examples directory.
\layout Standard
Quick Guide:
\layout Itemize
Create a frame as usual, and select the 'Has MenuBar' option in its properties.
Do *not* create a seperate MenuBar, this wont work.
\layout Itemize
Edit the menus of the MenuBar to your liking.
Ensure that you fill in the
\begin_inset Quotes eld
\end_inset
name
\begin_inset Quotes erd
\end_inset
field or the XML will not be generated correctly.
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\the_end
diff --git a/examples/demo.py b/examples/demo.py
index aeb2feb..bd8d6cc 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,53 +1,50 @@
from wxPython import wx
-from XRCWidgets import XRCFrame, XRCDialog
+from XRCWidgets import XRCApp, XRCDialog
from demo_widgets import DemoPanel
# Simple frame to demonstrate the use of menus and toolbar.
# Also shows how on_content() can be used to place widgets at creation time.
-class DemoFrame(XRCFrame):
+class DemoApp(XRCApp):
def on_m_file_exit_activate(self,ctrl):
"""Close the application"""
self.Close()
def on_m_file_new_activate(self,ctrl):
"""Create a new DemoPanel in the display area."""
dsp = self.getChild("displayarea")
p = DemoPanel(dsp)
self.replaceInWindow(dsp,p)
def on_tb_new_activate(self):
self.on_m_file_new_activate(None)
def on_m_help_about_activate(self,ctrl):
"""Show the About dialog."""
dlg = AboutDemoDialog(self)
dlg.ShowModal()
dlg.Destroy()
def on_tb_about_activate(self):
self.on_m_help_about_activate(None)
def on_displayarea_content(self,ctrl):
"""Initialise display area to contain a DemoPanel."""
return DemoPanel(ctrl)
# About Dialog demonstrates how to explicitly set widget name
# Other properies such as filename (_xrcfilename) and file location
# (_xrcfile) can be set similarly
class AboutDemoDialog(XRCDialog):
_xrcname = "about"
# Instantiate and run the application
def run():
- app = wx.wxPySimpleApp(0)
- frame = DemoFrame(None)
- app.SetTopWindow(frame)
- frame.Show()
+ app = DemoApp()
app.MainLoop()
diff --git a/examples/demo.xrc b/examples/demo.xrc
index 647c068..1e5a4a7 100644
--- a/examples/demo.xrc
+++ b/examples/demo.xrc
@@ -1,99 +1,99 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
<!-- generated by wxGlade 0.3.3 on Thu Jul 1 23:28:13 2004 -->
<resource version="2.3.0.1">
<object class="wxDialog" name="about">
<centered>1</centered>
<style>wxDIALOG_MODAL|wxCAPTION|wxRESIZE_BORDER|wxTHICK_FRAME|wxSTAY_ON_TOP</style>
<size>360, 230</size>
<title>About XRCWidgets...</title>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_1">
<label>XRCWidgets</label>
<font>
<style>normal</style>
<family>default</family>
<weight>normal</weight>
<underlined>1</underlined>
<size>17</size>
</font>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxTextCtrl" name="about_data">
<style>wxTE_MULTILINE|wxTE_READONLY</style>
<value>\nA Rapid GUI Development framework by Ryan Kelly.\n\nhttp://www.rfk.id.au/software/projects/XRCWidgets/\n\[email protected]</value>
</object>
</object>
</object>
</object>
</object>
</object>
- <object class="wxFrame" name="DemoFrame">
+ <object class="wxFrame" name="DemoApp">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>XRCWidgets Demonstration</title>
<object class="wxMenuBar" name="DemoFrame_menubar">
<object class="wxMenu" name="m_file">
<label>_File</label>
<object class="wxMenuItem" name="m_file_new">
<label>_New</label>
</object>
<object class="wxMenuItem" name="m_file_exit">
<label>E_xit</label>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>_Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>_About...</label>
</object>
</object>
</object>
<object class="wxToolBar" name="DemoFrame_toolbar">
<style>wxTB_TEXT|wxTB_NOICONS|wxTB_HORIZONTAL</style>
<object class="tool" name="tb_new">
<label>New</label>
</object>
<object class="tool" name="tb_about">
<label>About</label>
</object>
</object>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND|wxADJUST_MINSIZE</flag>
<object class="wxPanel" name="displayarea">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<object class="wxStaticText" name="label_3">
<label>Display Goes Here</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/menus.py b/examples/menus.py
index 8a6183a..f7a50bb 100644
--- a/examples/menus.py
+++ b/examples/menus.py
@@ -1,29 +1,26 @@
from wxPython import wx
-from XRCWidgets import XRCFrame
+from XRCWidgets import XRCApp
-class MenuFrame(XRCFrame):
+class MenuApp(XRCApp):
def on_m_file_exit_activate(self,ctrl):
self.Close()
def on_m_file_new_doc_activate(self,ctrl):
print "NEW DOCUMENT"
def on_m_file_new_tmpl_activate(self,ctrl):
print "NEW TEMPLATE"
def on_m_help_about_activate(self,ctrl):
print "SHOWING ABOUT DIALOG..."
def run():
- app = wx.wxPySimpleApp(0)
- frame = MenuFrame(None)
- app.SetTopWindow(frame)
- frame.Show()
+ app = MenuApp()
app.MainLoop()
diff --git a/examples/menus.xrc b/examples/menus.xrc
index 7858f2a..f16dd28 100644
--- a/examples/menus.xrc
+++ b/examples/menus.xrc
@@ -1,37 +1,37 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
<!-- generated by wxGlade 0.3.3 on Thu Jul 1 22:12:47 2004 -->
<resource version="2.3.0.1">
- <object class="wxFrame" name="MenuFrame" subclass="MyFrame">
+ <object class="wxFrame" name="MenuApp" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>Frame with Menus</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
</object>
</object>
<object class="wxMenuBar" name="MenuFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
<object class="wxMenu" name="m_file_new">
<label>New</label>
<object class="wxMenuItem" name="m_file_new_doc">
<label>Document</label>
</object>
<object class="wxMenuItem" name="m_file_new_tmpl">
<label>Template</label>
</object>
</object>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
</object>
</object>
<object class="wxMenu" name="m_help">
<label>Help</label>
<object class="wxMenuItem" name="m_help_about">
<label>About...</label>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/simple.py b/examples/simple.py
index f5beb03..8143724 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -1,23 +1,20 @@
from wxPython import wx
-from XRCWidgets import XRCFrame
+from XRCWidgets import XRCApp
-class SimpleFrame(XRCFrame):
+class SimpleApp(XRCApp):
def on_message_change(self,msg):
print "MESSAGE IS NOW:", msg.GetValue()
def on_ok_activate(self,bttn):
print self.getChild("message").GetValue()
def run():
- app = wx.wxPySimpleApp(0)
- frame = SimpleFrame(None)
- app.SetTopWindow(frame)
- frame.Show()
+ app = SimpleApp()
app.MainLoop()
diff --git a/examples/simple.xrc b/examples/simple.xrc
index 6864bce..9a5e97f 100644
--- a/examples/simple.xrc
+++ b/examples/simple.xrc
@@ -1,58 +1,58 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
<!-- generated by wxGlade 0.3.3 on Wed Jun 30 19:26:15 2004 -->
<resource version="2.3.0.1">
- <object class="wxFrame" name="SimpleFrame" subclass="MyFrame">
+ <object class="wxFrame" name="SimpleApp">
<style>wxDEFAULT_FRAME_STYLE</style>
<size>300, 120</size>
<title>Simple Frame</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxPanel" name="panel_1">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_1">
<label>Message: </label>
</object>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxTextCtrl" name="message">
<style>wxTE_PROCESS_ENTER</style>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxButton" name="ok">
<label>OK</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/setup.py b/setup.py
index 89394af..97a7da7 100644
--- a/setup.py
+++ b/setup.py
@@ -1,55 +1,55 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
import os
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "1"
-VER_REL = "3"
+VER_REL = "4"
VER_PATCH = ""
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
if eName.endswith(".py") or eName.endswith(".xrc"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
3a19eb334f03fa12dab15259fce61058465d1dda
|
Added "XRCApp" class, for simple application creation.
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 6dcba82..0aa066f 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,589 +1,623 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry, XMLDocTree, XMLElementData
+# The following seems to work around a wxWidgets bug which is making
+# XRCApp segfault, simply by creating a PySimpleApp.
+from wxPython import wx as wx2
+_WorkAround_app = wx2.wxPySimpleApp(0)
+del _WorkAround_app
+
+
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
def _makeXmlTree(self):
"""Populate self._xmltree with a representation of the XRC file."""
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def getChildId(self,cName):
"""Obtain the numeric ID of the named child."""
id = xrc.XRCID(cName)
if id is not None:
return id
chld = self.getChild(cName)
try:
return chld.GetId()
except AttributeError:
pass
raise XRCWidgetsError("Child '%s' could not be found" % cName)
def getChildType(self,cName):
"""Determine the type of the named child.
The type is returned as a string, typically the 'class' attribute of
the defining element in the XRC file. For example, "wxTextCtrl" or
"wxListBox".
"""
self._makeXmlTree()
data = self._xmltree.elements[cName]
try:
return data.attrs["class"]
except KeyError:
pass
eStr = "Type of child '%s' could not be determined"
raise XRCWidgetsError(eStr % (cName,))
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
- the immediate parent) then looking it up by its label, which if
+ the immediate parent) then looking it up by its label, which is
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
# Method matches magic pattern, hook it up
cName = mName[len(prfx):-1*len(sffx)]
handler = getattr(self,mName)
if not callable(handler):
break
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the name of the child in question
## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,cName,handler):
"""Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The handler to be called should expect the
control itself as an optional argument, which may or may not be received
depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxTextCtrl":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % cType)
def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. <handler> will be called with the child
widget as its only argument, and should return a wxWindow. This
window will be shown as the only content of the child window.
"""
child = self.getChild(cName)
widget = handler(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,cName,handler):
"""Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
precise type of the child. The method to be called may expect the
control itself as a default argument, passed depending on the type
of the control.
"""
cType = self.getChildType(cName)
# enourmous switch on child widget type
if cType == "wxButton":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
elif cType == "wxCheckBox":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif cType == "wxMenuItem":
child = self.getChild(cName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
elif cType == "tool":
handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
+class XRCDialog(wx.Dialog,XRCWidget):
+ """wx.Dialog with XRCWidget behaviors."""
+
+ def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
+ wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
+ XRCWidget.__init__(self,parent)
+
+ def _getPre(self):
+ return wx.PreDialog()
+
+ def _loadOn(self,XRCRes,pre,parent,nm):
+ return XRCRes.LoadOnDialog(pre,parent,nm)
+
+
+
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
+class XRCApp(XRCFrame):
+ """XRCFrame that can act as a standalone application.
+ This class provides a convient way to specify the main frame of
+ an application. It is equivalent to an XRCFrame, but provides
+ the following additional methods:
-class XRCDialog(wx.Dialog,XRCWidget):
- """wx.Dialog with XRCWidget behaviors."""
+ * MainLoop/ExitMainLoop
- def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
- wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
- XRCWidget.__init__(self,parent)
+ It thus behaves as a simple combination of a wx.Frame and a wx.App, with
+ the frame coming from the XRC file and being the TopLevelWindow of
+ the application.
+ """
- def _getPre(self):
- return wx.PreDialog()
+ def __init__(self,*args,**kwds):
+ parent = None
+ XRCFrame.__init__(self,parent,*args,**kwds)
+ self.__app = wx.PySimpleApp(0)
+ self.__app.SetTopWindow(self)
- def _loadOn(self,XRCRes,pre,parent,nm):
- return XRCRes.LoadOnDialog(pre,parent,nm)
+ def MainLoop(self):
+ self.Show()
+ self.__app.MainLoop()
+
+ def ExitMainLoop(self):
+ self.__app.ExitMainLoop()
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
|
rfk/xrcwidgets
|
68bdf300cef37ac8980169615a5d8fa1fc875e23
|
Fix ebuild to match portage name-change
|
diff --git a/tools/XRCWidgets-0.1.3.ebuild b/tools/XRCWidgets-0.1.3.ebuild
index 4ac8ce3..823855a 100644
--- a/tools/XRCWidgets-0.1.3.ebuild
+++ b/tools/XRCWidgets-0.1.3.ebuild
@@ -1,28 +1,28 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
inherit distutils
DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_3/XRCWidgets-0.1.3.tar.gz"
HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
IUSE=""
SLOT="0"
KEYWORDS="~x86"
LICENSE="wxWinLL-3"
DEPEND=">=dev-lang/python-2.3
- >=dev-python/wxPython-2.4.2.4"
+ >=dev-python/wxpython-2.4.2.4"
src_install() {
distutils_src_install
distutils_python_version
}
|
rfk/xrcwidgets
|
b0f61c94045231fe53249a7982c2c5d746f35a82
|
*** empty log message ***
|
diff --git a/setup.py b/setup.py
index c339ebb..89394af 100644
--- a/setup.py
+++ b/setup.py
@@ -1,55 +1,55 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
import os
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "1"
-VER_REL = "2"
-VER_PATCH = "_alpha1"
+VER_REL = "3"
+VER_PATCH = ""
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
# Locate and include all files in the 'examples' directory
_EXAMPLES = []
for eName in os.listdir("examples"):
if eName.endswith(".py") or eName.endswith(".xrc"):
_EXAMPLES.append("examples/%s" % eName)
DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
diff --git a/tools/XRCWidgets-0.1.3.ebuild b/tools/XRCWidgets-0.1.3.ebuild
new file mode 100644
index 0000000..4ac8ce3
--- /dev/null
+++ b/tools/XRCWidgets-0.1.3.ebuild
@@ -0,0 +1,28 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
+
+inherit distutils
+
+DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
+SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_3/XRCWidgets-0.1.3.tar.gz"
+HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~x86"
+LICENSE="wxWinLL-3"
+
+DEPEND=">=dev-lang/python-2.3
+ >=dev-python/wxPython-2.4.2.4"
+
+src_install() {
+
+ distutils_src_install
+ distutils_python_version
+
+}
+
+
+
+
|
rfk/xrcwidgets
|
a758c1bb7dafc54ea5204c0f987e40e608414846
|
Re-worked event connection routines to enable widgets for which explicit references are difficult to obtain. Used this to implement <activate> for toolbar buttons.
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index e95adae..6dcba82 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,534 +1,589 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry, XMLDocTree, XMLElementData
+
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
+
+ def _makeXmlTree(self):
+ """Populate self._xmltree with a representation of the XRC file."""
+ if self._xmltree is None:
+ xmlfile = file(self._xrcfile)
+ self._xmltree = XMLDocTree(xmlfile)
+
+
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
- if self._xmltree is None:
- xmlfile = file(self._xrcfile)
- self._xmltree = XMLDocTree(xmlfile)
+ self._makeXmlTree()
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
+
+ def getChildId(self,cName):
+ """Obtain the numeric ID of the named child."""
+ id = xrc.XRCID(cName)
+ if id is not None:
+ return id
+ chld = self.getChild(cName)
+ try:
+ return chld.GetId()
+ except AttributeError:
+ pass
+ raise XRCWidgetsError("Child '%s' could not be found" % cName)
+
+
+ def getChildType(self,cName):
+ """Determine the type of the named child.
+ The type is returned as a string, typically the 'class' attribute of
+ the defining element in the XRC file. For example, "wxTextCtrl" or
+ "wxListBox".
+ """
+ self._makeXmlTree()
+ data = self._xmltree.elements[cName]
+ try:
+ return data.attrs["class"]
+ except KeyError:
+ pass
+ eStr = "Type of child '%s' could not be determined"
+ raise XRCWidgetsError(eStr % (cName,))
+
+
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which if
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# I dont understand th behavior of GetChildren(). The list appears
# to include duplicate entries for children we have created, and
# sometimes has links to Dead C++ objects. Filter out the dead
# or repeated entries from the list.
for c in window.GetChildren():
if c:
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
- chldName = mName[len(prfx):-1*len(sffx)]
- chld = self.getChild(chldName)
+ # Method matches magic pattern, hook it up
+ cName = mName[len(prfx):-1*len(sffx)]
+ handler = getattr(self,mName)
+ if not callable(handler):
+ break
+
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
- cnctFunc(chld,mName)
+ cnctFunc(cName,handler)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
- ## that action. Such methods must take the child widget in question
- ## and the name of the method to connect to, and need not return any
- ## value.
+ ## that action. Such methods must take the name of the child in question
+ ## and the callable object to connect to, and need not return any value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
- def _connectAction_Change(self,child,mName):
- """Arrange to call method <mName> when <child>'s value is changed.
+ def _connectAction_Change(self,cName,handler):
+ """Arrange to call <handler> when widget <cName>'s value is changed.
The events connected by this method will be different depending on the
- precise type of <child>. The method to be called should expect the
- control itself as its only argument. It may be wrapped so that the
+ precise type of <child>. The handler to be called should expect the
+ control itself as an optional argument, which may or may not be received
+ depending on the type of control. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
- # retreive the method to be called and wrap it appropriately
- handler = getattr(self,mName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandleAndSkip,handler)
+ cType = self.getChildType(cName)
# enourmous switch on child widget type
- if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
+ if cType == "wxTextCtrl":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandleAndSkip,handler)
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
- elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
- wx.EVT_CHECKBOX(self,child.GetId(),handler)
+ elif cType == "wxCheckBox":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_CHECKBOX(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
- raise XRCWidgetsError(eStr % child.__class__)
+ raise XRCWidgetsError(eStr % cType)
- def _connectAction_Content(self,child,mName):
+ def _connectAction_Content(self,cName,handler):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
- fits nicely in the framework. The method <mName> will be called with
- <child> as its only argument, and should return a wxWindow. This
- window will be shown as the only content of <child>.
+ fits nicely in the framework. <handler> will be called with the child
+ widget as its only argument, and should return a wxWindow. This
+ window will be shown as the only content of the child window.
"""
- mthd = getattr(self,mName)
- widget = mthd(child)
+ child = self.getChild(cName)
+ widget = handler(child)
self.replaceInWindow(child,widget)
- def _connectAction_Activate(self,child,mName):
- """Arrange to call method <mName> when <child> is activated.
+ def _connectAction_Activate(self,cName,handler):
+ """Arrange to call <handler> when child <cName> is activated.
The events connected by this method will be different depending on the
- precise type of <child>. The method to be called should expect the
- control itself as its only argument.
+ precise type of the child. The method to be called may expect the
+ control itself as a default argument, passed depending on the type
+ of the control.
"""
- handler = getattr(self,mName)
- handler = lcurry(handler,child)
- handler = lcurry(_EvtHandle,handler)
+ cType = self.getChildType(cName)
# enourmous switch on child widget type
- if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
+ if cType == "wxButton":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
wx.EVT_BUTTON(self,child.GetId(),handler)
- elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
+ elif cType == "wxCheckBox":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
wx.EVT_CHECKBOX(self,child.GetId(),handler)
- elif isinstance(child,wx.MenuItem) or isinstance(child,wx.MenuItemPtr):
+ elif cType == "wxMenuItem":
+ child = self.getChild(cName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
wx.EVT_MENU(self,child.GetId(),handler)
+ elif cType == "tool":
+ handler = lcurry(_EvtHandle,handler)
+ wx.EVT_MENU(self,self.getChildId(cName),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/examples/demo.py b/examples/demo.py
index 57aeaf9..aeb2feb 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,47 +1,53 @@
from wxPython import wx
from XRCWidgets import XRCFrame, XRCDialog
from demo_widgets import DemoPanel
# Simple frame to demonstrate the use of menus and toolbar.
# Also shows how on_content() can be used to place widgets at creation time.
class DemoFrame(XRCFrame):
def on_m_file_exit_activate(self,ctrl):
"""Close the application"""
self.Close()
def on_m_file_new_activate(self,ctrl):
"""Create a new DemoPanel in the display area."""
dsp = self.getChild("displayarea")
p = DemoPanel(dsp)
self.replaceInWindow(dsp,p)
+ def on_tb_new_activate(self):
+ self.on_m_file_new_activate(None)
+
def on_m_help_about_activate(self,ctrl):
"""Show the About dialog."""
dlg = AboutDemoDialog(self)
dlg.ShowModal()
dlg.Destroy()
+ def on_tb_about_activate(self):
+ self.on_m_help_about_activate(None)
+
def on_displayarea_content(self,ctrl):
"""Initialise display area to contain a DemoPanel."""
return DemoPanel(ctrl)
# About Dialog demonstrates how to explicitly set widget name
# Other properies such as filename (_xrcfilename) and file location
# (_xrcfile) can be set similarly
class AboutDemoDialog(XRCDialog):
_xrcname = "about"
# Instantiate and run the application
def run():
app = wx.wxPySimpleApp(0)
frame = DemoFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
|
rfk/xrcwidgets
|
67aa2b6521fc71f756318eff2a6e89d9791a06d6
|
Fixes segfault when using replaceInWindow
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index f673126..e95adae 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,544 +1,534 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry, XMLDocTree, XMLElementData
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
# Whether not not to look for any connect methods with magic names of
# the form on_<name>_<action>. Set to false to make initialisation
# quicker.
_useMagicMethods = True
def __init__(self,parent):
# Attribute initialisation
self._xmltree = None
# XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
if self._useMagicMethods:
self._connectEventMethods()
def compact(self):
"""Reduce memory/resource usage of the widget.
This method is called automatically after initialisation to drop
references to unneeded resources. These may be accumulated as
as time goes on, so this method may be called manually to release
them if they are causing a problem.
"""
self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
if self._xmltree is None:
xmlfile = file(self._xrcfile)
self._xmltree = XMLDocTree(xmlfile)
try:
data = self._xmltree.elements[cName]
except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which if
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
- # For some reason, added widgets are appearing in GetChildren
- # multiple times. Filter them out for now, investigate more
- # later.
+ # I dont understand th behavior of GetChildren(). The list appears
+ # to include duplicate entries for children we have created, and
+ # sometimes has links to Dead C++ objects. Filter out the dead
+ # or repeated entries from the list.
for c in window.GetChildren():
- sizer.Remove(c)
- if c is not widget:
- c.Hide()
- if c not in oldChildren:
- oldChildren.append(c)
+ if c:
+ sizer.Remove(c)
+ if c is not widget:
+ c.Hide()
+ if c not in oldChildren:
+ oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,child,mName):
"""Arrange to call method <mName> when <child>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % child.__class__)
def _connectAction_Content(self,child,mName):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. The method <mName> will be called with
<child> as its only argument, and should return a wxWindow. This
window will be shown as the only content of <child>.
"""
mthd = getattr(self,mName)
widget = mthd(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,child,mName):
"""Arrange to call method <mName> when <child> is activated.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument.
"""
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
# enourmous switch on child widget type
if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
wx.EVT_BUTTON(self,child.GetId(),handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif isinstance(child,wx.MenuItem) or isinstance(child,wx.MenuItemPtr):
wx.EVT_MENU(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
-def _XMLElemByAttr(reqAttr,reqVal,name,attrs):
- """Check XML element description for matching attribute.
- Returns True iff <attrs> contains a key <reqAttr> with value <reqVal>.
- <name> is ignored.
- """
- try:
- if attrs[reqAttr] == reqVal:
- return True
- except KeyError:
- pass
- return False
-
|
rfk/xrcwidgets
|
c023c8aad81a245391347e478b8817d4be505fc1
|
Re-worked XML-parsing stuff to store a tree, and quick-lookup dict
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index c2c27d6..f673126 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,521 +1,544 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
-from utils import lcurry, findElementData, XMLElementData
+from utils import lcurry, XMLDocTree, XMLElementData
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
+ # Whether not not to look for any connect methods with magic names of
+ # the form on_<name>_<action>. Set to false to make initialisation
+ # quicker.
+ _useMagicMethods = True
+
+
def __init__(self,parent):
+ # Attribute initialisation
+ self._xmltree = None
+
+ # XRC resource loading
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
- self._connectEventMethods()
+ if self._useMagicMethods:
+ self._connectEventMethods()
+
+
+ def compact(self):
+ """Reduce memory/resource usage of the widget.
+ This method is called automatically after initialisation to drop
+ references to unneeded resources. These may be accumulated as
+ as time goes on, so this method may be called manually to release
+ them if they are causing a problem.
+ """
+ self._xmltree = None
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
- xmlfile = file(self._xrcfile)
- checker = lcurry(_XMLElemByAttr,"name",cName)
- data = findElementData(xmlfile,checker)
- if data is None:
+ if self._xmltree is None:
+ xmlfile = file(self._xrcfile)
+ self._xmltree = XMLDocTree(xmlfile)
+ try:
+ data = self._xmltree.elements[cName]
+ except:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which if
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
# Determine the item label. If it has a single underscore, remove
# it as it will be an accelerator key. If it has more than one,
# leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
lblParts = lbl.split("_")
if len(lblParts) == 2:
lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
# For some reason, added widgets are appearing in GetChildren
# multiple times. Filter them out for now, investigate more
# later.
for c in window.GetChildren():
sizer.Remove(c)
if c is not widget:
c.Hide()
if c not in oldChildren:
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,child,mName):
"""Arrange to call method <mName> when <child>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % child.__class__)
def _connectAction_Content(self,child,mName):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. The method <mName> will be called with
<child> as its only argument, and should return a wxWindow. This
window will be shown as the only content of <child>.
"""
mthd = getattr(self,mName)
widget = mthd(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,child,mName):
"""Arrange to call method <mName> when <child> is activated.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument.
"""
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
# enourmous switch on child widget type
if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
wx.EVT_BUTTON(self,child.GetId(),handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif isinstance(child,wx.MenuItem) or isinstance(child,wx.MenuItemPtr):
wx.EVT_MENU(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,id=-1,*args,**kwds):
wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
def _XMLElemByAttr(reqAttr,reqVal,name,attrs):
"""Check XML element description for matching attribute.
Returns True iff <attrs> contains a key <reqAttr> with value <reqVal>.
<name> is ignored.
"""
try:
if attrs[reqAttr] == reqVal:
return True
except KeyError:
pass
return False
diff --git a/XRCWidgets/utils.py b/XRCWidgets/utils.py
index a9c6138..6e24fd4 100644
--- a/XRCWidgets/utils.py
+++ b/XRCWidgets/utils.py
@@ -1,141 +1,149 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets.utils: Misc utility classes for XRCWidgets framework
"""
##
## Implementation of callable-object currying via 'lcurry' and 'rcurry'
##
class _curry:
"""Currying Base Class.
A 'curry' can be thought of as a partially-applied function call.
Some of the function's arguments are supplied when the curry is created,
the rest when it is called. In between these two stages, the curry can
be treated just like a function.
"""
def __init__(self,func,*args,**kwds):
self.func = func
self.args = args[:]
self.kwds = kwds.copy()
class lcurry(_curry):
"""Left-curry class.
This curry places positional arguments given at creation time to the left
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = self.args + args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
class rcurry(_curry):
"""Right-curry class.
This curry places positional arguments given at creation time to the right
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = args + self.args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
##
## Basic XML parsing for our own reading of the file
##
from xml.parsers import expat
+class XMLNameError(Exception): pass
+
class XMLElementData:
- """Represents information about an element gleaned from an XML file.
+ """Represents information about an element obtained from an XML file.
- This class represents an XML element as as much information as needed
+ This class represents an XML element and as much information as needed
about from the containing XML file. The important attribues are:
* name: name of XML element
* attrs: dictionary of key/value pairs of element attributes
* parent: XMLElementData representing parent element
* children: list containing XMLElementData objects and/or strings
of the element's children
Instances of this class are not intended to be created directly. Rather,
they should be created using the <findElementData> function from this
module.
"""
def __init__(self):
self.name = None
self.attrs = {}
self.parent = None
self.children = []
-def findElementData(xmlfile,checker):
- """Create and return XMLElemenetData for the requested element.
+class XMLDocTree:
+ """Represents an XML document as a tree of XMLElementData objects.
- This function parses the file-like object <xmlfile> in search of a
- particule XML element. The callable object <checker> will be called
- with the arguments (<name>,<attrs>) for each element processed, and
- must return True only if that element matches the one being searched for.
- The result is returned as an XMLElementData object.
+ This class provides the attribute 'root' which is the root XML
+ element, and the dictionary 'elements' which maps values of the XML
+ attribute "name" to the XMLElementData object for the corresponding
+ element.
"""
- parser = expat.ParserCreate()
- handler = _ElementHandler(checker)
- parser.StartElementHandler = handler.onStart
- parser.EndElementHandler = handler.onEnd
- parser.CharacterDataHandler = handler.onCdata
- parser.ParseFile(xmlfile)
- return handler.getElement()
-
-class _ElementHandler:
- """Private handlers for XML parsing with <findElementData>.
+ def __init__(self,xmlfile):
+ """XMLDocTree initialiser.
+ A file-like object containing the XML data must be given.
+ """
- This class provides methods <onStart>, <onEnd> and <onCdata> which can be
- used for the parsing event handlers.
- """
+ self.root = None
+ self._curElem = None
+ self.elements = {}
- ## TODO: only keep the parts of the tree that are needed
+ parser = expat.ParserCreate()
+ parser.StartElementHandler = self.onStart
+ parser.EndElementHandler = self.onEnd
+ parser.CharacterDataHandler = self.onCdata
+ parser.ParseFile(xmlfile)
- def __init__(self,checker):
- "Constructor. <checker> must be search element identifying function."
- self._checker = checker
- self._curElem = None
- self._theElem = None
def onStart(self,name,attrs):
data = XMLElementData()
data.name = name
data.attrs = attrs
data.parent = self._curElem
if self._curElem is not None:
self._curElem.children.append(data)
self._curElem = data
- if self._theElem is None:
- if self._checker(name,attrs):
- self._theElem = data
+ try:
+ nm = attrs["name"]
+ if self.elements.has_key(nm):
+ raise XMLNameError("Duplicate element name: '%s'" % (nm,))
+ self.elements[nm] = data
+ except KeyError:
+ pass
+
def onEnd(self,name):
- self._curElem = self._curElem.parent
+ if self._curElem.parent is not None:
+ self._curElem = self._curElem.parent
+ else:
+ self.root = self._curElem
+ self._curElem = None
def onCdata(self,cdata):
cdata = cdata.strip()
if cdata != "":
- self._curElem.children.append(cdata)
+ # Append CData to previous child if it was also CData
+ if len(self._curElem.children) == 0:
+ self._curElem.children.append(cdata)
+ else:
+ prevChild = self._curElem.children[-1]
+ if not isinstance(prevChild,XMLElementData):
+ self._curElem.children[-1] = "%s %s" % (prevChild,cdata)
+ else:
+ self._curElem.children.append(cdata)
- def getElement(self):
- """Called to retreive element data after parsing."""
- return self._theElem
diff --git a/examples/demo.py b/examples/demo.py
index dddb9e4..57aeaf9 100644
--- a/examples/demo.py
+++ b/examples/demo.py
@@ -1,47 +1,47 @@
from wxPython import wx
from XRCWidgets import XRCFrame, XRCDialog
from demo_widgets import DemoPanel
# Simple frame to demonstrate the use of menus and toolbar.
-# Also shows how on__content() can be used to place widgets at creation time.
+# Also shows how on_content() can be used to place widgets at creation time.
class DemoFrame(XRCFrame):
def on_m_file_exit_activate(self,ctrl):
"""Close the application"""
self.Close()
def on_m_file_new_activate(self,ctrl):
"""Create a new DemoPanel in the display area."""
dsp = self.getChild("displayarea")
p = DemoPanel(dsp)
self.replaceInWindow(dsp,p)
def on_m_help_about_activate(self,ctrl):
"""Show the About dialog."""
dlg = AboutDemoDialog(self)
dlg.ShowModal()
dlg.Destroy()
def on_displayarea_content(self,ctrl):
"""Initialise display area to contain a DemoPanel."""
return DemoPanel(ctrl)
# About Dialog demonstrates how to explicitly set widget name
# Other properies such as filename (_xrcfilename) and file location
# (_xrcfile) can be set similarly
class AboutDemoDialog(XRCDialog):
_xrcname = "about"
# Instantiate and run the application
def run():
app = wx.wxPySimpleApp(0)
frame = DemoFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
diff --git a/setup.py b/setup.py
index 0d4b36a..c339ebb 100644
--- a/setup.py
+++ b/setup.py
@@ -1,57 +1,55 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
+import os
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "1"
VER_REL = "2"
VER_PATCH = "_alpha1"
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
-DATA_FILES=[('share/XRCWidgets/examples',
- ['examples/simple.py',
- 'examples/simple.xrc',
- 'examples/demo.py',
- 'examples/demo.xrc',
- 'examples/demo_widgets.py',
- 'examples/demo_widgets.xrc',
- 'examples/menus.py',
- 'examples/menus.xrc']),
- ('share/XRCWidgets/docs',
+DATA_FILES=[('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
+# Locate and include all files in the 'examples' directory
+_EXAMPLES = []
+for eName in os.listdir("examples"):
+ if eName.endswith(".py") or eName.endswith(".xrc"):
+ _EXAMPLES.append("examples/%s" % eName)
+DATA_FILES.append(("share/XRCWidgets/examples",_EXAMPLES))
setup(name=NAME,
version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
a781bb53d8c13f7cd62dfd0bbe3f77376b775f74
|
Started the official TODO list
|
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..0afc281
--- /dev/null
+++ b/TODO
@@ -0,0 +1,5 @@
+
+
+ * Track down segfault from multiple calls to replaceInChild (may well
+ require a debug version of wxGTK)
+
|
rfk/xrcwidgets
|
43da7b373bbb7a657df5dff80f21424a09adb27d
|
Added a new example showcasing more complex features. Squashed quite a few bugs in the process, although some still remain.
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index e2bafb7..c2c27d6 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,510 +1,521 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry, findElementData, XMLElementData
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
def __init__(self,parent):
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
self._connectEventMethods()
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
- filePath = self._xrcfilename
+ filePath = cls._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for obtaining references to child widgets
##
def getChild(self,cName):
"""Lookup and return a child widget by name."""
# This can be done in two ways. Hopefully, the child has been
# picked up by xrc and can be obtained using XRCCTRL().
# If not, parse the XRC file ourselves and try to find it
chld = xrc.XRCCTRL(self,cName)
if chld is None:
# Find XML data on the named child, if possible
xmlfile = file(self._xrcfile)
checker = lcurry(_XMLElemByAttr,"name",cName)
data = findElementData(xmlfile,checker)
if data is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
# Determine object class, pass data off to appropriate method
mthdNm = "_getChild_%s" % (data.attrs["class"],)
try:
mthd = getattr(self,mthdNm)
except AttributeError:
raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
chld = mthd(data)
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
# The following methods are specially-named so they can be found easily
# Each is named of the form _getChild_<class> where <class> is the
# requested object's class attribute from the XRC file. Each will
# accept an XMLElementData object describing the requested widget and
# will attempt to return a reference to it.
def _getChild_wxMenuItem(self,data):
"""Get a reference to a wxMenuItem widget.
This requires finding the containing wxMenu widget (assumed to be
the immediate parent) then looking it up by its label, which if
found in the immediate children.
"""
# Get the containing menu
mData = data.parent
if mData.attrs.get("class") != "wxMenu":
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
menu = self._getChild_wxMenu(mData)
- # Determine the item label
+ # Determine the item label. If it has a single underscore, remove
+ # it as it will be an accelerator key. If it has more than one,
+ # leave it alone. TODO: how does XRC respond in this case?
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
+ lblParts = lbl.split("_")
+ if len(lblParts) == 2:
+ lbl = "".join(lblParts)
# Get and return the widget
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item
def _getChild_wxMenu(self,data):
"""Get a reference to a wxMenu widget.
This requires finding the containing widget, which is either a
wxMenu or a wxMenuBar, and applying the appropriate method to
find the menu by label.
"""
# Determine the item label
lbl = None
for c in data.children:
if isinstance(c,XMLElementData) and c.name == "label":
lbl = c.children[0]
if lbl is None:
eStr = "Child '%s' has no label" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
# Find parent widget, get and return reference
mData = data.parent
cls = mData.attrs.get("class")
if cls == "wxMenu":
menu = self._getChild_wxMenu(mData)
for item in menu.GetMenuItems():
if item.GetLabel() == lbl:
return item.GetSubMenu()
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
elif cls == "wxMenuBar":
menu = self._getChild_wxMenuBar(mData)
return menu.GetMenu(menu.FindMenu(lbl))
else:
eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
raise XRCWidgetsError(eStr)
def _getChild_wxMenuBar(self,data):
"""Get a reference to a wxMenuBar widget.
This is done in two stages - first by checking whether XRCCTRL
has a reference to it, and if not then attempting to obtain it
from the parent widget's GetMenuBar() method.
This could probably be done more reliablly - suggestions welcome!
"""
cName = data.attrs["name"]
mbar = xrc.XRCCTRL(self,cName)
if mbar is not None:
return mbar
parent = self.getChild(data.parent.attrs["name"])
try:
return parent.GetMenuBar()
except AttributeError:
eStr = "Child '%s' unreachable from parent." % (cName,)
raise XRCWidgetsError(eStr)
##
## Methods for manipulating child widgets
##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
+ # For some reason, added widgets are appearing in GetChildren
+ # multiple times. Filter them out for now, investigate more
+ # later.
for c in window.GetChildren():
sizer.Remove(c)
- c.Hide()
- oldChildren.append(c)
+ if c is not widget:
+ c.Hide()
+ if c not in oldChildren:
+ oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
+ return oldChildren
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,child,mName):
"""Arrange to call method <mName> when <child>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % child.__class__)
def _connectAction_Content(self,child,mName):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. The method <mName> will be called with
<child> as its only argument, and should return a wxWindow. This
window will be shown as the only content of <child>.
"""
mthd = getattr(self,mName)
widget = mthd(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,child,mName):
"""Arrange to call method <mName> when <child> is activated.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument.
"""
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
# enourmous switch on child widget type
if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
wx.EVT_BUTTON(self,child.GetId(),handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
elif isinstance(child,wx.MenuItem) or isinstance(child,wx.MenuItemPtr):
wx.EVT_MENU(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
- def __init__(self,parent,*args):
- wx.Panel.__init__(self,parent,*args)
+ def __init__(self,parent,id=-1,*args,**kwds):
+ wx.Panel.__init__(self,parent,id,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
- def __init__(self,parent,ID=-1,title="Untitled Frame",*args):
- wx.Frame.__init__(self,parent,ID,title,*args)
+ def __init__(self,parent,id=-1,title="Untitled Frame",*args,**kwds):
+ wx.Frame.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
- def __init__(self,parent,*args):
- wx.Dialog.__init__(self,parent,*args)
+ def __init__(self,parent,id=-1,title="Untitled Dialog",*args,**kwds):
+ wx.Dialog.__init__(self,parent,id,title,*args,**kwds)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
def _XMLElemByAttr(reqAttr,reqVal,name,attrs):
"""Check XML element description for matching attribute.
Returns True iff <attrs> contains a key <reqAttr> with value <reqVal>.
<name> is ignored.
"""
try:
if attrs[reqAttr] == reqVal:
return True
except KeyError:
pass
return False
diff --git a/examples/demo.py b/examples/demo.py
new file mode 100644
index 0000000..dddb9e4
--- /dev/null
+++ b/examples/demo.py
@@ -0,0 +1,47 @@
+
+from wxPython import wx
+
+from XRCWidgets import XRCFrame, XRCDialog
+from demo_widgets import DemoPanel
+
+# Simple frame to demonstrate the use of menus and toolbar.
+# Also shows how on__content() can be used to place widgets at creation time.
+class DemoFrame(XRCFrame):
+
+ def on_m_file_exit_activate(self,ctrl):
+ """Close the application"""
+ self.Close()
+
+ def on_m_file_new_activate(self,ctrl):
+ """Create a new DemoPanel in the display area."""
+ dsp = self.getChild("displayarea")
+ p = DemoPanel(dsp)
+ self.replaceInWindow(dsp,p)
+
+ def on_m_help_about_activate(self,ctrl):
+ """Show the About dialog."""
+ dlg = AboutDemoDialog(self)
+ dlg.ShowModal()
+ dlg.Destroy()
+
+ def on_displayarea_content(self,ctrl):
+ """Initialise display area to contain a DemoPanel."""
+ return DemoPanel(ctrl)
+
+
+# About Dialog demonstrates how to explicitly set widget name
+# Other properies such as filename (_xrcfilename) and file location
+# (_xrcfile) can be set similarly
+class AboutDemoDialog(XRCDialog):
+ _xrcname = "about"
+
+
+# Instantiate and run the application
+def run():
+ app = wx.wxPySimpleApp(0)
+ frame = DemoFrame(None)
+ app.SetTopWindow(frame)
+ frame.Show()
+ app.MainLoop()
+
+
diff --git a/examples/demo.xrc b/examples/demo.xrc
new file mode 100644
index 0000000..647c068
--- /dev/null
+++ b/examples/demo.xrc
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<!-- generated by wxGlade 0.3.3 on Thu Jul 1 23:28:13 2004 -->
+
+<resource version="2.3.0.1">
+ <object class="wxDialog" name="about">
+ <centered>1</centered>
+ <style>wxDIALOG_MODAL|wxCAPTION|wxRESIZE_BORDER|wxTHICK_FRAME|wxSTAY_ON_TOP</style>
+ <size>360, 230</size>
+ <title>About XRCWidgets...</title>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <flag>wxALIGN_CENTER_HORIZONTAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>10</border>
+ <object class="wxStaticText" name="label_1">
+ <label>XRCWidgets</label>
+ <font>
+ <style>normal</style>
+ <family>default</family>
+ <weight>normal</weight>
+ <underlined>1</underlined>
+ <size>17</size>
+ </font>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND</flag>
+ <object class="wxTextCtrl" name="about_data">
+ <style>wxTE_MULTILINE|wxTE_READONLY</style>
+ <value>\nA Rapid GUI Development framework by Ryan Kelly.\n\nhttp://www.rfk.id.au/software/projects/XRCWidgets/\n\[email protected]</value>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="wxFrame" name="DemoFrame">
+ <style>wxDEFAULT_FRAME_STYLE</style>
+ <title>XRCWidgets Demonstration</title>
+ <object class="wxMenuBar" name="DemoFrame_menubar">
+ <object class="wxMenu" name="m_file">
+ <label>_File</label>
+ <object class="wxMenuItem" name="m_file_new">
+ <label>_New</label>
+ </object>
+ <object class="wxMenuItem" name="m_file_exit">
+ <label>E_xit</label>
+ </object>
+ </object>
+ <object class="wxMenu" name="m_help">
+ <label>_Help</label>
+ <object class="wxMenuItem" name="m_help_about">
+ <label>_About...</label>
+ </object>
+ </object>
+ </object>
+ <object class="wxToolBar" name="DemoFrame_toolbar">
+ <style>wxTB_TEXT|wxTB_NOICONS|wxTB_HORIZONTAL</style>
+ <object class="tool" name="tb_new">
+ <label>New</label>
+ </object>
+ <object class="tool" name="tb_about">
+ <label>About</label>
+ </object>
+ </object>
+ <object class="wxPanel">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND|wxADJUST_MINSIZE</flag>
+ <object class="wxPanel" name="displayarea">
+ <style>wxTAB_TRAVERSAL</style>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="label_3">
+ <label>Display Goes Here</label>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</resource>
diff --git a/examples/demo_widgets.py b/examples/demo_widgets.py
new file mode 100644
index 0000000..2deb1ef
--- /dev/null
+++ b/examples/demo_widgets.py
@@ -0,0 +1,35 @@
+
+from XRCWidgets import XRCPanel
+
+class DemoPanel(XRCPanel):
+ """Simple panel allowing two numbers to be added.
+ The values in the textboxes are tracked as they are changed, reverting
+ to previous values if a non-number is entered. The result is updated
+ when 'add' is pressed.
+ """
+
+ def __init__(self,*args,**kwds):
+ XRCPanel.__init__(self,*args,**kwds)
+ self._val1 = 0
+ self._val2 = 0
+
+ def on_val1_change(self,ctrl):
+ newVal = ctrl.GetValue()
+ try:
+ newVal = float(newVal)
+ self._val1 = newVal
+ except ValueError:
+ ctrl.SetValue(str(self._val1))
+
+ def on_val2_change(self,ctrl):
+ newVal = ctrl.GetValue()
+ try:
+ newVal = float(newVal)
+ self._val2 = newVal
+ except ValueError:
+ ctrl.SetValue(str(self._val2))
+
+ def on_add_activate(self,ctrl):
+ result = self._val1 + self._val2
+ self.getChild("result").SetValue(str(result))
+
diff --git a/examples/demo_widgets.xrc b/examples/demo_widgets.xrc
new file mode 100644
index 0000000..1130ce6
--- /dev/null
+++ b/examples/demo_widgets.xrc
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<!-- generated by wxGlade 0.3.3 on Thu Jul 1 23:08:11 2004 -->
+
+<resource version="2.3.0.1">
+ <object class="wxPanel" name="DemoPanel">
+ <style>wxTAB_TRAVERSAL</style>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_HORIZONTAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ <object class="wxTextCtrl" name="val1">
+ <style>wxTE_PROCESS_ENTER</style>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxStaticText" name="label_2">
+ <label> + </label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ <object class="wxTextCtrl" name="val2">
+ <style>wxTE_PROCESS_ENTER</style>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxStaticText" name="label_3">
+ <label> = </label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
+ <border>5</border>
+ <object class="wxTextCtrl" name="result">
+ <style>wxTE_READONLY</style>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALL|wxALIGN_CENTER_HORIZONTAL</flag>
+ <border>5</border>
+ <object class="wxButton" name="add">
+ <label>Add</label>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</resource>
diff --git a/examples/menus.py b/examples/menus.py
index 1332717..8a6183a 100644
--- a/examples/menus.py
+++ b/examples/menus.py
@@ -1,26 +1,29 @@
from wxPython import wx
from XRCWidgets import XRCFrame
class MenuFrame(XRCFrame):
def on_m_file_exit_activate(self,ctrl):
self.Close()
def on_m_file_new_doc_activate(self,ctrl):
print "NEW DOCUMENT"
def on_m_file_new_tmpl_activate(self,ctrl):
print "NEW TEMPLATE"
+ def on_m_help_about_activate(self,ctrl):
+ print "SHOWING ABOUT DIALOG..."
+
def run():
app = wx.wxPySimpleApp(0)
frame = MenuFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
diff --git a/examples/menus.xrc b/examples/menus.xrc
index 4d7dbe6..7858f2a 100644
--- a/examples/menus.xrc
+++ b/examples/menus.xrc
@@ -1,31 +1,37 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
-<!-- generated by wxGlade 0.3.3 on Wed Jun 30 22:55:18 2004 -->
+<!-- generated by wxGlade 0.3.3 on Thu Jul 1 22:12:47 2004 -->
<resource version="2.3.0.1">
<object class="wxFrame" name="MenuFrame" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>Frame with Menus</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
</object>
</object>
<object class="wxMenuBar" name="MenuFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
<object class="wxMenu" name="m_file_new">
<label>New</label>
<object class="wxMenuItem" name="m_file_new_doc">
<label>Document</label>
</object>
<object class="wxMenuItem" name="m_file_new_tmpl">
<label>Template</label>
</object>
</object>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
</object>
</object>
+ <object class="wxMenu" name="m_help">
+ <label>Help</label>
+ <object class="wxMenuItem" name="m_help_about">
+ <label>About...</label>
+ </object>
+ </object>
</object>
</object>
</resource>
diff --git a/setup.py b/setup.py
index 3d81a11..0d4b36a 100644
--- a/setup.py
+++ b/setup.py
@@ -1,51 +1,57 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "1"
VER_REL = "2"
VER_PATCH = "_alpha1"
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/examples',
['examples/simple.py',
- 'examples/simple.xrc']),
+ 'examples/simple.xrc',
+ 'examples/demo.py',
+ 'examples/demo.xrc',
+ 'examples/demo_widgets.py',
+ 'examples/demo_widgets.xrc',
+ 'examples/menus.py',
+ 'examples/menus.xrc']),
('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
setup(name=NAME,
version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
3e0cb477aa9cb262622ebecafa22ba0e655582f9
|
New ebuild for v0.1.2
|
diff --git a/tools/XRCWidgets-0.1.2_alpha1.ebuild b/tools/XRCWidgets-0.1.2_alpha1.ebuild
new file mode 100644
index 0000000..c1f4450
--- /dev/null
+++ b/tools/XRCWidgets-0.1.2_alpha1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
+
+inherit distutils
+
+DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
+SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_2_alpha1/XRCWidgets-0.1.2_alpha1.tar.gz"
+HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~x86"
+LICENSE="wxWinLL-3"
+
+DEPEND=">=dev-lang/python-2.3
+ >=dev-python/wxPython-2.4.2.4"
+
+src_install() {
+
+ distutils_src_install
+ distutils_python_version
+
+}
+
+
+
+
|
rfk/xrcwidgets
|
ac99ea71f0a120247fd74d447f1ae0b10d7bcdb1
|
Major new functionality - ability to find children not indexed by XRC. This facility has been used to implement on_activate() for wxMenuItem's
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index a545cce..e2bafb7 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,392 +1,510 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
-from utils import lcurry
+from utils import lcurry, findElementData, XMLElementData
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
def __init__(self,parent):
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
self._connectEventMethods()
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = self._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
- ## Methods for manipulating child widgets
+ ## Methods for obtaining references to child widgets
##
- def _getChildName(self,cName):
- """This method allows name-mangling to be inserted, if required."""
- return cName
-
-
def getChild(self,cName):
"""Lookup and return a child widget by name."""
- chld = xrc.XRCCTRL(self,self._getChildName(cName))
+ # This can be done in two ways. Hopefully, the child has been
+ # picked up by xrc and can be obtained using XRCCTRL().
+ # If not, parse the XRC file ourselves and try to find it
+ chld = xrc.XRCCTRL(self,cName)
if chld is None:
- raise XRCWidgetsError("Child '%s' not found" % (cName,))
+ # Find XML data on the named child, if possible
+ xmlfile = file(self._xrcfile)
+ checker = lcurry(_XMLElemByAttr,"name",cName)
+ data = findElementData(xmlfile,checker)
+ if data is None:
+ raise XRCWidgetsError("Child '%s' not found" % (cName,))
+ # Determine object class, pass data off to appropriate method
+ mthdNm = "_getChild_%s" % (data.attrs["class"],)
+ try:
+ mthd = getattr(self,mthdNm)
+ except AttributeError:
+ raise XRCWidgetsError("Child '%s' of unsupported type"%(cName,))
+ chld = mthd(data)
+ if chld is None:
+ raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
+ # The following methods are specially-named so they can be found easily
+ # Each is named of the form _getChild_<class> where <class> is the
+ # requested object's class attribute from the XRC file. Each will
+ # accept an XMLElementData object describing the requested widget and
+ # will attempt to return a reference to it.
+
+ def _getChild_wxMenuItem(self,data):
+ """Get a reference to a wxMenuItem widget.
+
+ This requires finding the containing wxMenu widget (assumed to be
+ the immediate parent) then looking it up by its label, which if
+ found in the immediate children.
+ """
+ # Get the containing menu
+ mData = data.parent
+ if mData.attrs.get("class") != "wxMenu":
+ eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
+ raise XRCWidgetsError(eStr)
+ menu = self._getChild_wxMenu(mData)
+
+ # Determine the item label
+ lbl = None
+ for c in data.children:
+ if isinstance(c,XMLElementData) and c.name == "label":
+ lbl = c.children[0]
+ if lbl is None:
+ eStr = "Child '%s' has no label" % (data.attrs["name"],)
+ raise XRCWidgetsError(eStr)
+
+ # Get and return the widget
+ for item in menu.GetMenuItems():
+ if item.GetLabel() == lbl:
+ return item
+
+
+ def _getChild_wxMenu(self,data):
+ """Get a reference to a wxMenu widget.
+
+ This requires finding the containing widget, which is either a
+ wxMenu or a wxMenuBar, and applying the appropriate method to
+ find the menu by label.
+ """
+ # Determine the item label
+ lbl = None
+ for c in data.children:
+ if isinstance(c,XMLElementData) and c.name == "label":
+ lbl = c.children[0]
+ if lbl is None:
+ eStr = "Child '%s' has no label" % (data.attrs["name"],)
+ raise XRCWidgetsError(eStr)
+
+ # Find parent widget, get and return reference
+ mData = data.parent
+ cls = mData.attrs.get("class")
+ if cls == "wxMenu":
+ menu = self._getChild_wxMenu(mData)
+ for item in menu.GetMenuItems():
+ if item.GetLabel() == lbl:
+ return item.GetSubMenu()
+ eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
+ raise XRCWidgetsError(eStr)
+ elif cls == "wxMenuBar":
+ menu = self._getChild_wxMenuBar(mData)
+ return menu.GetMenu(menu.FindMenu(lbl))
+ else:
+ eStr = "Child '%s' has incorrect parent" % (data.attrs["name"],)
+ raise XRCWidgetsError(eStr)
+
+
+ def _getChild_wxMenuBar(self,data):
+ """Get a reference to a wxMenuBar widget.
+
+ This is done in two stages - first by checking whether XRCCTRL
+ has a reference to it, and if not then attempting to obtain it
+ from the parent widget's GetMenuBar() method.
+ This could probably be done more reliablly - suggestions welcome!
+ """
+ cName = data.attrs["name"]
+ mbar = xrc.XRCCTRL(self,cName)
+ if mbar is not None:
+ return mbar
+ parent = self.getChild(data.parent.attrs["name"])
+ try:
+ return parent.GetMenuBar()
+ except AttributeError:
+ eStr = "Child '%s' unreachable from parent." % (cName,)
+ raise XRCWidgetsError(eStr)
+
+
+ ##
+ ## Methods for manipulating child widgets
+ ##
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
for c in window.GetChildren():
sizer.Remove(c)
c.Hide()
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,child,mName):
"""Arrange to call method <mName> when <child>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % child.__class__)
def _connectAction_Content(self,child,mName):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. The method <mName> will be called with
<child> as its only argument, and should return a wxWindow. This
window will be shown as the only content of <child>.
"""
mthd = getattr(self,mName)
widget = mthd(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,child,mName):
"""Arrange to call method <mName> when <child> is activated.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument.
"""
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
# enourmous switch on child widget type
if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
wx.EVT_BUTTON(self,child.GetId(),handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
+ elif isinstance(child,wx.MenuItem) or isinstance(child,wx.MenuItemPtr):
+ wx.EVT_MENU(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Panel.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,ID=-1,title="Untitled Frame",*args):
wx.Frame.__init__(self,parent,ID,title,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Dialog.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
+def _XMLElemByAttr(reqAttr,reqVal,name,attrs):
+ """Check XML element description for matching attribute.
+ Returns True iff <attrs> contains a key <reqAttr> with value <reqVal>.
+ <name> is ignored.
+ """
+ try:
+ if attrs[reqAttr] == reqVal:
+ return True
+ except KeyError:
+ pass
+ return False
+
diff --git a/XRCWidgets/utils.py b/XRCWidgets/utils.py
index d4fe819..a9c6138 100644
--- a/XRCWidgets/utils.py
+++ b/XRCWidgets/utils.py
@@ -1,53 +1,141 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets.utils: Misc utility classes for XRCWidgets framework
"""
##
## Implementation of callable-object currying via 'lcurry' and 'rcurry'
##
class _curry:
"""Currying Base Class.
A 'curry' can be thought of as a partially-applied function call.
Some of the function's arguments are supplied when the curry is created,
the rest when it is called. In between these two stages, the curry can
be treated just like a function.
"""
def __init__(self,func,*args,**kwds):
self.func = func
self.args = args[:]
self.kwds = kwds.copy()
class lcurry(_curry):
"""Left-curry class.
This curry places positional arguments given at creation time to the left
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = self.args + args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
class rcurry(_curry):
"""Right-curry class.
This curry places positional arguments given at creation time to the right
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = args + self.args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
+##
+## Basic XML parsing for our own reading of the file
+##
+
+from xml.parsers import expat
+
+class XMLElementData:
+ """Represents information about an element gleaned from an XML file.
+
+ This class represents an XML element as as much information as needed
+ about from the containing XML file. The important attribues are:
+
+ * name: name of XML element
+ * attrs: dictionary of key/value pairs of element attributes
+ * parent: XMLElementData representing parent element
+ * children: list containing XMLElementData objects and/or strings
+ of the element's children
+
+ Instances of this class are not intended to be created directly. Rather,
+ they should be created using the <findElementData> function from this
+ module.
+ """
+
+ def __init__(self):
+ self.name = None
+ self.attrs = {}
+ self.parent = None
+ self.children = []
+
+
+def findElementData(xmlfile,checker):
+ """Create and return XMLElemenetData for the requested element.
+
+ This function parses the file-like object <xmlfile> in search of a
+ particule XML element. The callable object <checker> will be called
+ with the arguments (<name>,<attrs>) for each element processed, and
+ must return True only if that element matches the one being searched for.
+ The result is returned as an XMLElementData object.
+ """
+ parser = expat.ParserCreate()
+ handler = _ElementHandler(checker)
+ parser.StartElementHandler = handler.onStart
+ parser.EndElementHandler = handler.onEnd
+ parser.CharacterDataHandler = handler.onCdata
+ parser.ParseFile(xmlfile)
+ return handler.getElement()
+
+
+class _ElementHandler:
+ """Private handlers for XML parsing with <findElementData>.
+
+ This class provides methods <onStart>, <onEnd> and <onCdata> which can be
+ used for the parsing event handlers.
+ """
+
+ ## TODO: only keep the parts of the tree that are needed
+
+ def __init__(self,checker):
+ "Constructor. <checker> must be search element identifying function."
+ self._checker = checker
+ self._curElem = None
+ self._theElem = None
+
+ def onStart(self,name,attrs):
+ data = XMLElementData()
+ data.name = name
+ data.attrs = attrs
+ data.parent = self._curElem
+ if self._curElem is not None:
+ self._curElem.children.append(data)
+ self._curElem = data
+ if self._theElem is None:
+ if self._checker(name,attrs):
+ self._theElem = data
+
+ def onEnd(self,name):
+ self._curElem = self._curElem.parent
+
+ def onCdata(self,cdata):
+ cdata = cdata.strip()
+ if cdata != "":
+ self._curElem.children.append(cdata)
+
+ def getElement(self):
+ """Called to retreive element data after parsing."""
+ return self._theElem
+
+
diff --git a/docs/manual.lyx b/docs/manual.lyx
index 16b1de0..843cab7 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,512 +1,514 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
\layout Standard
This document is Copyright 2004, Ryan Kelly.
Unrestricted verbatim copies may be made and distributed.
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
\layout Subsection
Underlying Technologies
\layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
\newline
http://www.wxwidgets.org/
\layout Itemize
wxPython is a wxWidgets binding for the Python language
\newline
http://www.wxPython.org
\layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
\layout Subsection
Purpose
\layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
\layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
- XRCWidgets, and if final versions required greater efficiency than the
- toolkit can provide then it is a simple matter to convert the XRC files
- into Python or C++ code.
+ XRCWidgets, and if final versions require greater efficiency than the toolkit
+ can provide it is a simple matter to convert the XRC files into Python
+ or C++ code.
\layout Subsection
Advantages
\layout Subsubsection
Rapid GUI Development
\layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
- the rest of the application
+ the rest of the application.
\layout Subsubsection
Declarative Event Handling
\layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
\layout Subsubsection
Separation of Layout from Code
\layout Standard
Rapid GUI development is also possible using designers that directly output
Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
-n and it is almost impossible to reverse-engineer the code for further editing.
+n and almost impossible to reverse-engineer the code for further editing.
\layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
\layout Subsubsection
Easy Conversion to Native Code
\layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
\layout Subsubsection
Compatibility with Standard wxPython Code
\layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
- bunch of child widgets created and event handlers connected as it is initialise
-d.
+ collection of child widgets created and event handlers connected as it
+ is initialised.
\layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
\layout Subsubsection
Simple Re-sizing of GUI
\layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
\layout Section
Classes Provided
\layout Standard
The classes provided by the XRCWidgets framework are detailed below.
\layout Subsection
XRCWidgetsError
\layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
\layout Subsection
XRCWidget
\layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
\layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
\layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
\layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
\layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
\layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
\layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
\layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
\layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
\layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
\end_inset
replaceInChild
\begin_inset Quotes erd
\end_inset
in the constructor
\layout Subsection
XRCPanel
\layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCDialog
\layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCFrame
\layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
\layout Section
Tutorials
+\layout Standard
+
+The following are a number of quick tutorials to get you started using the
+ framework.
+ The code for these tutorials can be found in the 'examles' directory of
+ the source distribution.
\layout Subsection
The Basics
\layout Standard
This section provides a quick tutorial for creating a widget using the XRCWidget
s framework.
The widget in question is to be called 'SimpleFrame', and will live in
the file 'simple.py'.
- We will create a wxFrame with a text-box and a button, which prints a message
- to the terminal when the button is clicked.
+ It will consist of a wxFrame with a text-box and a button, which prints
+ a message to the terminal when the button is clicked.
The frame will look something like this:
\layout Standard
\added_space_top smallskip \added_space_bottom smallskip \align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
\end_inset
\layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
-\layout Standard
-
-For additional examples of the toolkit in action, see the 'examples' directory
- of the distribution.
\layout Subsubsection
Creating the XRC File
\layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
\layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
\layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
\end_inset
Add a Frame
\begin_inset Quotes erd
\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
\end_inset
SimpleFrame
\begin_inset Quotes erd
\end_inset
- this is to correspond to the name of the class that is to be created.
\layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
and a button named
\begin_inset Quotes eld
\end_inset
ok
\begin_inset Quotes erd
\end_inset
.
\layout Standard
When the frame is finished, selected Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
\end_inset
xrc2wxg
\begin_inset Quotes erd
\end_inset
which can convert from the XRC file to a wxGlade project file.
\layout Subsubsection
Creating the Python Code
\layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
\layout Standard
Next, create the python file 'simple.py' using the following code:
\layout LyX-Code
from XRCWidgets import XRCFrame
\layout LyX-Code
class SimpleFrame(XRCFrame):
\layout LyX-Code
def on_message_change(self,msg):
\layout LyX-Code
print
\begin_inset Quotes eld
\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
\end_inset
, msg.GetValue()
\layout LyX-Code
def on_ok_activate(self,bttn):
\layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
).GetValue()
\layout Standard
This code is all that is required to make a functioning frame.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
\end_inset
on_message_change
\begin_inset Quotes erd
\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
\end_inset
on_ok_activate
\begin_inset Quotes erd
\end_inset
will be called whenever the button is clicked.
\layout Subsubsection
Testing the Widget
\layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
\layout LyX-Code
from simple import SimpleFrame
\layout LyX-Code
from wxPython.wx import *
\layout LyX-Code
app = wxPySimpleApp(0)
\layout LyX-Code
frame = SimpleFrame(None)
\layout LyX-Code
app.SetTopWindow(frame)
\layout LyX-Code
frame.Show()
\layout LyX-Code
app.MainLoop()
\layout Standard
This code imports the widget's definition, creates a wxPython application,
and runs it using SimpleFrame as its top level window.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
\layout Subsection
-Creating a Menu Bar
+A more complicated Frame
\layout Standard
This tutorial is yet to be completed.
See the files 'menus.py' and menus.xrc' in the examples directory.
\layout Standard
Quick Guide:
\layout Itemize
Create a frame as usual, and select the 'Has MenuBar' option in its properties.
Do *not* create a seperate MenuBar, this wont work.
\layout Itemize
Edit the menus of the MenuBar to your liking.
Ensure that you fill in the
\begin_inset Quotes eld
\end_inset
name
\begin_inset Quotes erd
\end_inset
field or the XML will not be generated correctly.
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\the_end
diff --git a/examples/menus.py b/examples/menus.py
index d09bf9f..1332717 100644
--- a/examples/menus.py
+++ b/examples/menus.py
@@ -1,19 +1,26 @@
from wxPython import wx
from XRCWidgets import XRCFrame
class MenuFrame(XRCFrame):
- pass
+ def on_m_file_exit_activate(self,ctrl):
+ self.Close()
+
+ def on_m_file_new_doc_activate(self,ctrl):
+ print "NEW DOCUMENT"
+
+ def on_m_file_new_tmpl_activate(self,ctrl):
+ print "NEW TEMPLATE"
def run():
app = wx.wxPySimpleApp(0)
frame = MenuFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
diff --git a/examples/menus.xrc b/examples/menus.xrc
index 3bc3d40..4d7dbe6 100644
--- a/examples/menus.xrc
+++ b/examples/menus.xrc
@@ -1,22 +1,31 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
-<!-- generated by wxGlade 0.3.3 on Wed Jun 30 00:03:52 2004 -->
+<!-- generated by wxGlade 0.3.3 on Wed Jun 30 22:55:18 2004 -->
<resource version="2.3.0.1">
- <object class="wxFrame" name="MenuFrame">
+ <object class="wxFrame" name="MenuFrame" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<title>Frame with Menus</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
</object>
</object>
<object class="wxMenuBar" name="MenuFrame_menubar">
<object class="wxMenu" name="m_file">
<label>File</label>
+ <object class="wxMenu" name="m_file_new">
+ <label>New</label>
+ <object class="wxMenuItem" name="m_file_new_doc">
+ <label>Document</label>
+ </object>
+ <object class="wxMenuItem" name="m_file_new_tmpl">
+ <label>Template</label>
+ </object>
+ </object>
<object class="wxMenuItem" name="m_file_exit">
<label>Exit</label>
</object>
</object>
</object>
</object>
</resource>
diff --git a/examples/simple.xrc b/examples/simple.xrc
index 599e47a..6864bce 100644
--- a/examples/simple.xrc
+++ b/examples/simple.xrc
@@ -1,57 +1,58 @@
<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
-<!-- generated by wxGlade 0.3.2 on Fri May 7 21:52:50 2004 -->
+<!-- generated by wxGlade 0.3.3 on Wed Jun 30 19:26:15 2004 -->
<resource version="2.3.0.1">
- <object class="wxFrame" name="SimpleFrame">
+ <object class="wxFrame" name="SimpleFrame" subclass="MyFrame">
<style>wxDEFAULT_FRAME_STYLE</style>
<size>300, 120</size>
<title>Simple Frame</title>
<object class="wxPanel">
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxEXPAND</flag>
<object class="wxPanel" name="panel_1">
<style>wxTAB_TRAVERSAL</style>
<object class="wxBoxSizer">
<orient>wxVERTICAL</orient>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
<border>10</border>
<object class="wxStaticText" name="label_1">
<label>Message: </label>
</object>
</object>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxTextCtrl" name="message">
+ <style>wxTE_PROCESS_ENTER</style>
</object>
</object>
</object>
</object>
<object class="sizeritem">
<option>1</option>
<flag>wxALIGN_CENTER_HORIZONTAL</flag>
<object class="wxBoxSizer">
<orient>wxHORIZONTAL</orient>
<object class="sizeritem">
<flag>wxALIGN_CENTER_VERTICAL</flag>
<object class="wxButton" name="ok">
<label>OK</label>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</resource>
diff --git a/setup.py b/setup.py
index 6406299..3d81a11 100644
--- a/setup.py
+++ b/setup.py
@@ -1,51 +1,51 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "1"
-VER_REL = "1"
+VER_REL = "2"
VER_PATCH = "_alpha1"
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/examples',
['examples/simple.py',
'examples/simple.xrc']),
('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
('share/XRCWidgets/docs/licence',
['licence/lgpl.txt',
'licence/licence.txt',
'licence/licendoc.txt',
'licence/preamble.txt']),
]
setup(name=NAME,
version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
b90a4e12e7510391378d650f6f3ccc040e393bbc
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 9f610cb..a545cce 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,392 +1,392 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
# Location of the XRC file to load content from
# Can be set at class-level in the subclass to force a specific location
_xrcfile = None
# Name of the resource to load from the XRC file, containing definitions
# for this object. Defaults to the name of the class.
# Set at class-level to specify a specific name.
_xrcname = None
def __init__(self,parent):
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
self._connectEventMethods()
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = self._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
The class-level attribute _xrcname may be used to specify an alternate
name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
- if self._xrcname is None:
+ if self._xrcname is not None:
resName = self._xrcname
else:
resName = self.__class__.__name__
self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for manipulating child widgets
##
def _getChildName(self,cName):
"""This method allows name-mangling to be inserted, if required."""
return cName
def getChild(self,cName):
"""Lookup and return a child widget by name."""
chld = xrc.XRCCTRL(self,self._getChildName(cName))
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
for c in window.GetChildren():
sizer.Remove(c)
c.Hide()
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,child,mName):
"""Arrange to call method <mName> when <child>'s value is changed.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % child.__class__)
def _connectAction_Content(self,child,mName):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. The method <mName> will be called with
<child> as its only argument, and should return a wxWindow. This
window will be shown as the only content of <child>.
"""
mthd = getattr(self,mName)
widget = mthd(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,child,mName):
"""Arrange to call method <mName> when <child> is activated.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument.
"""
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
# enourmous switch on child widget type
if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
wx.EVT_BUTTON(self,child.GetId(),handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Panel.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,ID=-1,title="Untitled Frame",*args):
wx.Frame.__init__(self,parent,ID,title,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Dialog.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
"""Handle an event by invoking <toCall> without arguments.
The event itself is ignored.
"""
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/docs/manual.lyx b/docs/manual.lyx
index f79e2f1..16b1de0 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,483 +1,512 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
\layout Standard
This document is Copyright 2004, Ryan Kelly.
Unrestricted verbatim copies may be made and distributed.
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
\layout Subsection
Underlying Technologies
\layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
\newline
http://www.wxwidgets.org/
\layout Itemize
wxPython is a wxWidgets binding for the Python language
\newline
http://www.wxPython.org
\layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
\layout Subsection
Purpose
\layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
\layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
XRCWidgets, and if final versions required greater efficiency than the
toolkit can provide then it is a simple matter to convert the XRC files
into Python or C++ code.
\layout Subsection
Advantages
\layout Subsubsection
Rapid GUI Development
\layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
the rest of the application
\layout Subsubsection
Declarative Event Handling
\layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
\layout Subsubsection
Separation of Layout from Code
\layout Standard
Rapid GUI development is also possible using designers that directly output
Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
n and it is almost impossible to reverse-engineer the code for further editing.
\layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
\layout Subsubsection
Easy Conversion to Native Code
\layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
\layout Subsubsection
Compatibility with Standard wxPython Code
\layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
bunch of child widgets created and event handlers connected as it is initialise
d.
\layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
\layout Subsubsection
Simple Re-sizing of GUI
\layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
\layout Section
Classes Provided
\layout Standard
The classes provided by the XRCWidgets framework are detailed below.
\layout Subsection
XRCWidgetsError
\layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
\layout Subsection
XRCWidget
\layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
\layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
\layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
\layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
\layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
\layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
\layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
\layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
\layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
\layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
\end_inset
replaceInChild
\begin_inset Quotes erd
\end_inset
in the constructor
\layout Subsection
XRCPanel
\layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCDialog
\layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCFrame
\layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
\layout Section
-Tutorial
+Tutorials
+\layout Subsection
+
+The Basics
\layout Standard
This section provides a quick tutorial for creating a widget using the XRCWidget
s framework.
The widget in question is to be called 'SimpleFrame', and will live in
the file 'simple.py'.
We will create a wxFrame with a text-box and a button, which prints a message
to the terminal when the button is clicked.
The frame will look something like this:
\layout Standard
\added_space_top smallskip \added_space_bottom smallskip \align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
\end_inset
\layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
\layout Standard
For additional examples of the toolkit in action, see the 'examples' directory
of the distribution.
-\layout Subsection
+\layout Subsubsection
Creating the XRC File
\layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
\layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
\layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
\end_inset
Add a Frame
\begin_inset Quotes erd
\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
\end_inset
SimpleFrame
\begin_inset Quotes erd
\end_inset
- this is to correspond to the name of the class that is to be created.
\layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
and a button named
\begin_inset Quotes eld
\end_inset
ok
\begin_inset Quotes erd
\end_inset
.
\layout Standard
When the frame is finished, selected Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
\end_inset
xrc2wxg
\begin_inset Quotes erd
\end_inset
which can convert from the XRC file to a wxGlade project file.
-\layout Subsection
+\layout Subsubsection
Creating the Python Code
\layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
\layout Standard
Next, create the python file 'simple.py' using the following code:
\layout LyX-Code
from XRCWidgets import XRCFrame
\layout LyX-Code
class SimpleFrame(XRCFrame):
\layout LyX-Code
def on_message_change(self,msg):
\layout LyX-Code
print
\begin_inset Quotes eld
\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
\end_inset
, msg.GetValue()
\layout LyX-Code
def on_ok_activate(self,bttn):
\layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
).GetValue()
\layout Standard
This code is all that is required to make a functioning frame.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
\end_inset
on_message_change
\begin_inset Quotes erd
\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
\end_inset
on_ok_activate
\begin_inset Quotes erd
\end_inset
will be called whenever the button is clicked.
-\layout Subsection
+\layout Subsubsection
Testing the Widget
\layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
\layout LyX-Code
from simple import SimpleFrame
\layout LyX-Code
from wxPython.wx import *
\layout LyX-Code
app = wxPySimpleApp(0)
\layout LyX-Code
frame = SimpleFrame(None)
\layout LyX-Code
app.SetTopWindow(frame)
\layout LyX-Code
frame.Show()
\layout LyX-Code
app.MainLoop()
\layout Standard
This code imports the widget's definition, creates a wxPython application,
and runs it using SimpleFrame as its top level window.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
+\layout Subsection
+
+Creating a Menu Bar
+\layout Standard
+
+This tutorial is yet to be completed.
+ See the files 'menus.py' and menus.xrc' in the examples directory.
+\layout Standard
+
+Quick Guide:
+\layout Itemize
+
+Create a frame as usual, and select the 'Has MenuBar' option in its properties.
+ Do *not* create a seperate MenuBar, this wont work.
+\layout Itemize
+
+Edit the menus of the MenuBar to your liking.
+ Ensure that you fill in the
+\begin_inset Quotes eld
+\end_inset
+
+name
+\begin_inset Quotes erd
+\end_inset
+
+ field or the XML will not be generated correctly.
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\the_end
diff --git a/examples/menus.py b/examples/menus.py
new file mode 100644
index 0000000..d09bf9f
--- /dev/null
+++ b/examples/menus.py
@@ -0,0 +1,19 @@
+
+
+from wxPython import wx
+from XRCWidgets import XRCFrame
+
+
+class MenuFrame(XRCFrame):
+
+ pass
+
+
+
+def run():
+ app = wx.wxPySimpleApp(0)
+ frame = MenuFrame(None)
+ app.SetTopWindow(frame)
+ frame.Show()
+ app.MainLoop()
+
diff --git a/examples/menus.xrc b/examples/menus.xrc
new file mode 100644
index 0000000..3bc3d40
--- /dev/null
+++ b/examples/menus.xrc
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<!-- generated by wxGlade 0.3.3 on Wed Jun 30 00:03:52 2004 -->
+
+<resource version="2.3.0.1">
+ <object class="wxFrame" name="MenuFrame">
+ <style>wxDEFAULT_FRAME_STYLE</style>
+ <title>Frame with Menus</title>
+ <object class="wxPanel">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ </object>
+ </object>
+ <object class="wxMenuBar" name="MenuFrame_menubar">
+ <object class="wxMenu" name="m_file">
+ <label>File</label>
+ <object class="wxMenuItem" name="m_file_exit">
+ <label>Exit</label>
+ </object>
+ </object>
+ </object>
+ </object>
+</resource>
|
rfk/xrcwidgets
|
5f98ac5058c020aa8cbd938327c5fbacb0d3d626
|
*** empty log message ***
|
diff --git a/tools/XRCWidgets-0.1.1_alpha1.ebuild b/tools/XRCWidgets-0.1.1_alpha1.ebuild
index 4f2b9ab..6786a81 100644
--- a/tools/XRCWidgets-0.1.1_alpha1.ebuild
+++ b/tools/XRCWidgets-0.1.1_alpha1.ebuild
@@ -1,29 +1,28 @@
# Copyright 2004, Ryan Kelly
# Released under the terms of the wxWindows Licence, version 3.
# See the file 'lincence/preamble.txt' in the main distribution for details.
inherit distutils
DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_1_alpha1/XRCWidgets-0.1.1_alpha1.tar.gz"
HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
IUSE=""
SLOT="0"
KEYWORDS="~x86"
LICENSE="wxWinLL-3"
-# 2.1 gave sandbox violations see #21
DEPEND=">=dev-lang/python-2.3
>=dev-python/wxPython-2.4.2.4"
src_install() {
distutils_src_install
distutils_python_version
}
|
rfk/xrcwidgets
|
7a03fcace38adb2f55dfb37d69ffdf4f3d2663a8
|
Preparing for initial release!
|
diff --git a/MANIFEST.in b/MANIFEST.in
index c8fe90d..f873ee3 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,5 +1,11 @@
-include examples/*
-include docs/*
+include examples/*.py
+include examples/*.xrc
+
+include docs/*.ps
+include docs/*.pdf
+
+recursive-include tools *
+recursive-include licence *
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 0bad6b7..9f610cb 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,369 +1,392 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
-
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
- # Location of the XRC file to load content from
- # Can be set at class-level in the subclass to force a specific location
- _xrcfile = None
-
# Name of the XRC file to load content from
# Will be searched for along the default XRC file path
# Set at class-level in the subclass to force a specific name
_xrcfilename = None
+ # Location of the XRC file to load content from
+ # Can be set at class-level in the subclass to force a specific location
+ _xrcfile = None
+
+ # Name of the resource to load from the XRC file, containing definitions
+ # for this object. Defaults to the name of the class.
+ # Set at class-level to specify a specific name.
+ _xrcname = None
+
def __init__(self,parent):
if self._xrcfile is None:
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
self._connectEventMethods()
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
+
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
if cls._xrcfilename is None:
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
else:
filePath = self._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
+
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
+
+ The class-level attribute _xrcname may be used to specify an alternate
+ name for the resource, rather than the class name.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
- self._loadOn(self._xrcres,pre,parent,self.__class__.__name__)
+ if self._xrcname is None:
+ resName = self._xrcname
+ else:
+ resName = self.__class__.__name__
+ self._loadOn(self._xrcres,pre,parent,resName)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for manipulating child widgets
##
def _getChildName(self,cName):
"""This method allows name-mangling to be inserted, if required."""
return cName
def getChild(self,cName):
"""Lookup and return a child widget by name."""
chld = xrc.XRCCTRL(self,self._getChildName(cName))
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
return chld
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
+
<toCreate> should be a callable (usually a class) returning the widget
instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
+
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
+
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
for c in window.GetChildren():
sizer.Remove(c)
c.Hide()
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
"activate": "_connectAction_Activate",
}
def _connectAction_Change(self,child,mName):
"""Arrange to call method <mName> when <child>'s value is changed.
+
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
- control itself as its only argument. It will be wrapped so that the
+ control itself as its only argument. It may be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
wx.EVT_KILL_FOCUS(child,handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Change' action."
raise XRCWidgetsError(eStr % child.__class__)
def _connectAction_Content(self,child,mName):
"""Replace the content of <child> with that returned by method <mName>.
Strictly, this is not an 'event' handler as it only performs actions
on initialisation. It is however a useful piece of functionality and
fits nicely in the framework. The method <mName> will be called with
<child> as its only argument, and should return a wxWindow. This
window will be shown as the only content of <child>.
"""
mthd = getattr(self,mName)
widget = mthd(child)
self.replaceInWindow(child,widget)
def _connectAction_Activate(self,child,mName):
"""Arrange to call method <mName> when <child> is activated.
The events connected by this method will be different depending on the
precise type of <child>. The method to be called should expect the
control itself as its only argument.
"""
handler = getattr(self,mName)
handler = lcurry(handler,child)
handler = lcurry(_EvtHandle,handler)
# enourmous switch on child widget type
if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
wx.EVT_BUTTON(self,child.GetId(),handler)
elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
eStr = "Widget type <%s> not supported by 'Activate' action."
raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Panel.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,ID=-1,title="Untitled Frame",*args):
wx.Frame.__init__(self,parent,ID,title,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Dialog.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
def _EvtHandle(toCall,evnt):
+ """Handle an event by invoking <toCall> without arguments.
+ The event itself is ignored.
+ """
toCall()
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/XRCWidgets/utils.py b/XRCWidgets/utils.py
index 31bf940..d4fe819 100644
--- a/XRCWidgets/utils.py
+++ b/XRCWidgets/utils.py
@@ -1,50 +1,53 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
"""
XRCWidgets.utils: Misc utility classes for XRCWidgets framework
"""
##
## Implementation of callable-object currying via 'lcurry' and 'rcurry'
##
class _curry:
"""Currying Base Class.
A 'curry' can be thought of as a partially-applied function call.
Some of the function's arguments are supplied when the curry is created,
the rest when it is called. In between these two stages, the curry can
be treated just like a function.
"""
def __init__(self,func,*args,**kwds):
self.func = func
self.args = args[:]
self.kwds = kwds.copy()
class lcurry(_curry):
"""Left-curry class.
This curry places positional arguments given at creation time to the left
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = self.args + args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
class rcurry(_curry):
"""Right-curry class.
This curry places positional arguments given at creation time to the right
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = args + self.args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
diff --git a/docs/manual.lyx b/docs/manual.lyx
index fbbf103..f79e2f1 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,479 +1,483 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
+\layout Standard
+
+This document is Copyright 2004, Ryan Kelly.
+ Unrestricted verbatim copies may be made and distributed.
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
\layout Subsection
Underlying Technologies
\layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
\newline
http://www.wxwidgets.org/
\layout Itemize
wxPython is a wxWidgets binding for the Python language
\newline
http://www.wxPython.org
\layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
\layout Subsection
Purpose
\layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
\layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
XRCWidgets, and if final versions required greater efficiency than the
toolkit can provide then it is a simple matter to convert the XRC files
into Python or C++ code.
\layout Subsection
Advantages
\layout Subsubsection
Rapid GUI Development
\layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
the rest of the application
\layout Subsubsection
Declarative Event Handling
\layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
\layout Subsubsection
Separation of Layout from Code
\layout Standard
Rapid GUI development is also possible using designers that directly output
Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
n and it is almost impossible to reverse-engineer the code for further editing.
\layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
\layout Subsubsection
Easy Conversion to Native Code
\layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
\layout Subsubsection
Compatibility with Standard wxPython Code
\layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
bunch of child widgets created and event handlers connected as it is initialise
d.
\layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
\layout Subsubsection
Simple Re-sizing of GUI
\layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
\layout Section
Classes Provided
\layout Standard
The classes provided by the XRCWidgets framework are detailed below.
\layout Subsection
XRCWidgetsError
\layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
\layout Subsection
XRCWidget
\layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
\layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
\layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
\layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
\layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
\layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
\layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
\layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
\layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
\layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
\end_inset
replaceInChild
\begin_inset Quotes erd
\end_inset
in the constructor
\layout Subsection
XRCPanel
\layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCDialog
\layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCFrame
\layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
\layout Section
Tutorial
\layout Standard
This section provides a quick tutorial for creating a widget using the XRCWidget
s framework.
The widget in question is to be called 'SimpleFrame', and will live in
the file 'simple.py'.
We will create a wxFrame with a text-box and a button, which prints a message
to the terminal when the button is clicked.
The frame will look something like this:
\layout Standard
\added_space_top smallskip \added_space_bottom smallskip \align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
\end_inset
\layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
\layout Standard
For additional examples of the toolkit in action, see the 'examples' directory
of the distribution.
\layout Subsection
Creating the XRC File
\layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
\layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
\layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
\end_inset
Add a Frame
\begin_inset Quotes erd
\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
\end_inset
SimpleFrame
\begin_inset Quotes erd
\end_inset
- this is to correspond to the name of the class that is to be created.
\layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
and a button named
\begin_inset Quotes eld
\end_inset
ok
\begin_inset Quotes erd
\end_inset
.
\layout Standard
When the frame is finished, selected Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
\end_inset
xrc2wxg
\begin_inset Quotes erd
\end_inset
which can convert from the XRC file to a wxGlade project file.
\layout Subsection
Creating the Python Code
\layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
\layout Standard
Next, create the python file 'simple.py' using the following code:
\layout LyX-Code
from XRCWidgets import XRCFrame
\layout LyX-Code
class SimpleFrame(XRCFrame):
\layout LyX-Code
def on_message_change(self,msg):
\layout LyX-Code
print
\begin_inset Quotes eld
\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
\end_inset
, msg.GetValue()
\layout LyX-Code
def on_ok_activate(self,bttn):
\layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
).GetValue()
\layout Standard
This code is all that is required to make a functioning frame.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
\end_inset
on_message_change
\begin_inset Quotes erd
\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
\end_inset
on_ok_activate
\begin_inset Quotes erd
\end_inset
will be called whenever the button is clicked.
\layout Subsection
Testing the Widget
\layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
\layout LyX-Code
from simple import SimpleFrame
\layout LyX-Code
from wxPython.wx import *
\layout LyX-Code
app = wxPySimpleApp(0)
\layout LyX-Code
frame = SimpleFrame(None)
\layout LyX-Code
app.SetTopWindow(frame)
\layout LyX-Code
frame.Show()
\layout LyX-Code
app.MainLoop()
\layout Standard
This code imports the widget's definition, creates a wxPython application,
and runs it using SimpleFrame as its top level window.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\the_end
diff --git a/licence/lgpl.txt b/licence/lgpl.txt
new file mode 100644
index 0000000..d43cdf0
--- /dev/null
+++ b/licence/lgpl.txt
@@ -0,0 +1,517 @@
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ ==================================
+ Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL. It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+ Preamble
+
+The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General
+Public Licenses are intended to guarantee your freedom to share
+and change free software--to make sure the software is free for
+all its users.
+
+This license, the Library General Public License, applies to
+some specially designated Free Software Foundation software, and
+to any other libraries whose authors decide to use it. You can
+use it for your libraries, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure
+that you have the freedom to distribute copies of free software
+(and charge for this service if you wish), that you receive
+source code or can get it if you want it, that you can change
+the software or use pieces of it in new free programs; and that
+you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the
+rights. These restrictions translate to certain responsibilities
+for you if you distribute copies of the library, or if you
+modify it.
+
+For example, if you distribute copies of the library, whether
+gratis or for a fee, you must give the recipients all the rights
+that we gave you. You must make sure that they, too, receive or
+can get the source code. If you link a program with the
+library, you must provide complete object files to the
+recipients so that they can relink them with the library, after
+making changes to the library and recompiling it. And you must
+show them these terms so they know their rights.
+
+Our method of protecting your rights has two steps: (1)
+copyright the library, and (2) offer you this license which
+gives you legal permission to copy, distribute and/or modify the
+library.
+
+Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this
+free library. If the library is modified by someone else and
+passed on, we want its recipients to know that what they have is
+not the original version, so that any problems introduced by
+others will not reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that companies
+distributing free software will individually obtain patent
+licenses, thus in effect transforming the program into
+proprietary software. To prevent this, we have made it clear
+that any patent must be licensed for everyone's free use or not
+licensed at all.
+
+Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License, which was designed for
+utility programs. This license, the GNU Library General Public
+License, applies to certain designated libraries. This license
+is quite different from the ordinary one; be sure to read it in
+full, and don't assume that anything in it is the same as in the
+ordinary license.
+
+The reason we have a separate public license for some libraries
+is that they blur the distinction we usually make between
+modifying or adding to a program and simply using it. Linking a
+program with a library, without changing the library, is in some
+sense simply using the library, and is analogous to running a
+utility program or application program. However, in a textual
+and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General
+Public License treats it as such.
+
+Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote
+software sharing, because most developers did not use the
+libraries. We concluded that weaker conditions might promote
+sharing better.
+
+However, unrestricted linking of non-free programs would deprive
+the users of those programs of all benefit from the free status
+of the libraries themselves. This Library General Public
+License is intended to permit developers of non-free programs to
+use free libraries, while preserving your freedom as a user of
+such programs to change the free libraries that are incorporated
+in them. (We have not seen how to achieve this as regards
+changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.) The hope is
+that this will lead to faster development of free libraries.
+
+The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference
+between a "work based on the library" and a "work that uses the
+library". The former contains code derived from the library,
+while the latter only works together with the library.
+
+Note that it is possible for a library to be covered by the
+ordinary General Public License rather than by this special one.
+
+ GNU LIBRARY GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other
+authorized party saying it may be distributed under the terms of
+this Library General Public License (also called "this
+License"). Each licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application
+programs (which use some of those functions and data) to form
+executables.
+
+The "Library", below, refers to any such software library or
+work which has been distributed under these terms. A "work
+based on the Library" means either the Library or any derivative
+work under copyright law: that is to say, a work containing the
+Library or a portion of it, either verbatim or with
+modifications and/or translated straightforwardly into another
+language. (Hereinafter, translation is included without
+limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work
+for making modifications to it. For a library, complete source
+code means all the source code for all modules it contains, plus
+any associated interface definition files, plus the scripts used
+to control compilation and installation of the library.
+
+Activities other than copying, distribution and modification are
+not covered by this License; they are outside its scope. The
+act of running a program using the Library is not restricted,
+and output from such a program is covered only if its contents
+constitute a work based on the Library (independent of the use
+of the Library in a tool for writing it). Whether that is true
+depends on what the Library does and what the program that uses
+the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided
+that you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep
+intact all the notices that refer to this License and to the
+absence of any warranty; and distribute a copy of this License
+along with the Library.
+
+You may charge a fee for the physical act of transferring a
+copy, and you may at your option offer warranty protection in
+exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any
+portion of it, thus forming a work based on the Library, and
+copy and distribute such modifications or work under the terms
+of Section 1 above, provided that you also meet all of these
+conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the
+Library, and can be reasonably considered independent and
+separate works in themselves, then this License, and its terms,
+do not apply to those sections when you distribute them as
+separate works. But when you distribute the same sections as
+part of a whole which is a work based on the Library, the
+distribution of the whole must be on the terms of this License,
+whose permissions for other licensees extend to the entire
+whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or
+contest your rights to work written entirely by you; rather, the
+intent is to exercise the right to control the distribution of
+derivative or collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the
+Library with the Library (or with a work based on the Library)
+on a volume of a storage or distribution medium does not bring
+the other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General
+Public License instead of this License to a given copy of the
+Library. To do this, you must alter all the notices that refer
+to this License, so that they refer to the ordinary GNU General
+Public License, version 2, instead of to this License. (If a
+newer version than version 2 of the ordinary GNU General Public
+License has appeared, then you can specify that version instead
+if you wish.) Do not make any other change in these notices.
+
+Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to
+all subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable
+form under the terms of Sections 1 and 2 above provided that you
+accompany it with the complete corresponding machine-readable
+source code, which must be distributed under the terms of
+Sections 1 and 2 above on a medium customarily used for software
+interchange.
+
+If distribution of object code is made by offering access to
+copy from a designated place, then offering equivalent access to
+copy the source code from the same place satisfies the
+requirement to distribute the source code, even though third
+parties are not compelled to copy the source along with the
+object code.
+
+5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being
+compiled or linked with it, is called a "work that uses the
+Library". Such a work, in isolation, is not a derivative work
+of the Library, and therefore falls outside the scope of this
+License.
+
+However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library
+(because it contains portions of the Library), rather than a
+"work that uses the library". The executable is therefore
+covered by this License. Section 6 states terms for distribution
+of such executables.
+
+When a "work that uses the Library" uses material from a header
+file that is part of the Library, the object code for the work
+may be a derivative work of the Library even though the source
+code is not. Whether this is true is especially significant if
+the work can be linked without the Library, or if the work is
+itself a library. The threshold for this to be true is not
+precisely defined by law.
+
+If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small
+inline functions (ten lines or less in length), then the use of
+the object file is unrestricted, regardless of whether it is
+legally a derivative work. (Executables containing this object
+code plus portions of the Library will still fall under Section
+6.)
+
+Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of
+Section 6. Any executables containing that work also fall under
+Section 6, whether or not they are linked directly with the
+Library itself.
+
+6. As an exception to the Sections above, you may also compile
+or link a "work that uses the Library" with the Library to
+produce a work containing portions of the Library, and
+distribute that work under terms of your choice, provided that
+the terms permit modification of the work for the customer's own
+use and reverse engineering for debugging such modifications.
+
+You must give prominent notice with each copy of the work that
+the Library is used in it and that the Library and its use are
+covered by this License. You must supply a copy of this
+License. If the work during execution displays copyright
+notices, you must include the copyright notice for the Library
+among them, as well as a reference directing the user to the
+copy of this License. Also, you must do one of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ c) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ d) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special
+exception, the source code distributed need not include anything
+that is normally distributed (in either source or binary form)
+with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that
+component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you
+cannot use both them and the Library together in an executable
+that you distribute.
+
+7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other
+library facilities not covered by this License, and distribute
+such a combined library, provided that the separate distribution
+of the work based on the Library and of the other library
+facilities is otherwise permitted, and provided that you do
+these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or
+distribute the Library except as expressly provided under this
+License. Any attempt otherwise to copy, modify, sublicense,
+link with, or distribute the Library is void, and will
+automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you
+under this License will not have their licenses terminated so
+long as such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have
+not signed it. However, nothing else grants you permission to
+modify or distribute the Library or its derivative works. These
+actions are prohibited by law if you do not accept this
+License. Therefore, by modifying or distributing the Library
+(or any work based on the Library), you indicate your acceptance
+of this License to do so, and all its terms and conditions for
+copying, distributing or modifying the Library or works based on
+it.
+
+10. Each time you redistribute the Library (or any work based on
+the Library), the recipient automatically receives a license
+from the original licensor to copy, distribute, link with or
+modify the Library subject to these terms and conditions. You
+may not impose any further restrictions on the recipients'
+exercise of the rights granted herein. You are not responsible
+for enforcing compliance by third parties to this License.
+
+11. If, as a consequence of a court judgment or allegation of
+patent infringement or for any other reason (not limited to
+patent issues), conditions are imposed on you (whether by court
+order, agreement or otherwise) that contradict the conditions of
+this License, they do not excuse you from the conditions of this
+License. If you cannot distribute so as to satisfy
+simultaneously your obligations under this License and any other
+pertinent obligations, then as a consequence you may not
+distribute the Library at all. For example, if a patent license
+would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you,
+then the only way you could satisfy both it and this License
+would be to refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable
+under any particular circumstance, the balance of the section is
+intended to apply, and the section as a whole is intended to
+apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe
+any patents or other property right claims or to contest
+validity of any such claims; this section has the sole purpose
+of protecting the integrity of the free software distribution
+system which is implemented by public license practices. Many
+people have made generous contributions to the wide range of
+software distributed through that system in reliance on
+consistent application of that system; it is up to the
+author/donor to decide if he or she is willing to distribute
+software through any other system and a licensee cannot impose
+that choice.
+
+This section is intended to make thoroughly clear what is
+believed to be a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted
+in certain countries either by patents or by copyrighted
+interfaces, the original copyright holder who places the Library
+under this License may add an explicit geographical distribution
+limitation excluding those countries, so that distribution is
+permitted only in or among countries not thus excluded. In such
+case, this License incorporates the limitation as if written in
+the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to
+time. Such new versions will be similar in spirit to the present
+version, but may differ in detail to address new problems or
+concerns.
+
+Each version is given a distinguishing version number. If the
+Library specifies a version number of this License which applies
+to it and "any later version", you have the option of following
+the terms and conditions either of that version or of any later
+version published by the Free Software Foundation. If the
+Library does not specify a license version number, you may
+choose any version ever published by the Free Software
+Foundation.
+
+14. If you wish to incorporate parts of the Library into other
+free programs whose distribution conditions are incompatible
+with these, write to the author to ask for permission. For
+software which is copyrighted by the Free Software Foundation,
+write to the Free Software Foundation; we sometimes make
+exceptions for this. Our decision will be guided by the two
+goals of preserving the free status of all derivatives of our
+free software and of promoting the sharing and reuse of software
+generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Libraries
+
+If you develop a new library, and you want it to be of the
+greatest possible use to the public, we recommend making it free
+software that everyone can redistribute and change. You can do
+so by permitting redistribution under these terms (or,
+alternatively, under the terms of the ordinary General Public
+License).
+
+To apply these terms, attach the following notices to the
+library. It is safest to attach them to the start of each
+source file to most effectively convey the exclusion of
+warranty; and each file should have at least the "copyright"
+line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this library; if not, write to the Free
+ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
diff --git a/licence/licence.txt b/licence/licence.txt
new file mode 100644
index 0000000..c91deed
--- /dev/null
+++ b/licence/licence.txt
@@ -0,0 +1,53 @@
+ wxWindows Library Licence, Version 3
+ ====================================
+
+ Copyright (c) 1998 Julian Smart, Robert Roebling et al
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ WXWINDOWS LIBRARY LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ This library is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public Licence as published by
+ the Free Software Foundation; either version 2 of the Licence, or (at
+ your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
+ General Public Licence for more details.
+
+ You should have received a copy of the GNU Library General Public Licence
+ along with this software, usually in a file named COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA.
+
+ EXCEPTION NOTICE
+
+ 1. As a special exception, the copyright holders of this library give
+ permission for additional uses of the text contained in this release of
+ the library as licenced under the wxWindows Library Licence, applying
+ either version 3 of the Licence, or (at your option) any later version of
+ the Licence as published by the copyright holders of version 3 of the
+ Licence document.
+
+ 2. The exception is that you may use, copy, link, modify and distribute
+ under the user's own terms, binary object code versions of works based
+ on the Library.
+
+ 3. If you copy code from files distributed under the terms of the GNU
+ General Public Licence or the GNU Library General Public Licence into a
+ copy of this library, as this licence permits, the exception does not
+ apply to the code that you add in this way. To avoid misleading anyone as
+ to the status of such modified files, you must delete this exception
+ notice from such code and/or adjust the licensing conditions notice
+ accordingly.
+
+ 4. If you write modifications of your own for this library, it is your
+ choice whether to permit this exception to apply to your modifications.
+ If you do not wish that, you must delete the exception notice from such
+ code and/or adjust the licensing conditions notice accordingly.
+
+
diff --git a/licence/licendoc.txt b/licence/licendoc.txt
new file mode 100644
index 0000000..5bfa143
--- /dev/null
+++ b/licence/licendoc.txt
@@ -0,0 +1,60 @@
+ wxWindows Free Documentation Licence, Version 3
+ ===============================================
+
+ Copyright (c) 1998 Julian Smart, Robert Roebling et al
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this licence document, but changing it is not allowed.
+
+ WXWINDOWS FREE DOCUMENTATION LICENCE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 1. Permission is granted to make and distribute verbatim copies of this
+ manual or piece of documentation provided any copyright notice and this
+ permission notice are preserved on all copies.
+
+ 2. Permission is granted to process this file or document through a
+ document processing system and, at your option and the option of any third
+ party, print the results, provided a printed document carries a copying
+ permission notice identical to this one.
+
+ 3. Permission is granted to copy and distribute modified versions of this
+ manual or piece of documentation under the conditions for verbatim
+ copying, provided also that any sections describing licensing conditions
+ for this manual, such as, in particular, the GNU General Public Licence,
+ the GNU Library General Public Licence, and any wxWindows Licence are
+ included exactly as in the original, and provided that the entire
+ resulting derived work is distributed under the terms of a permission
+ notice identical to this one.
+
+ 4. Permission is granted to copy and distribute translations of this
+ manual or piece of documentation into another language, under the above
+ conditions for modified versions, except that sections related to
+ licensing, including this paragraph, may also be included in translations
+ approved by the copyright holders of the respective licence documents in
+ addition to the original English.
+
+ WARRANTY DISCLAIMER
+
+ 5. BECAUSE THIS MANUAL OR PIECE OF DOCUMENTATION IS LICENSED FREE OF CHARGE,
+ THERE IS NO WARRANTY FOR IT, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THIS MANUAL OR PIECE OF DOCUMENTATION "AS IS" WITHOUT
+ WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF
+ THE MANUAL OR PIECE OF DOCUMENTATION IS WITH YOU. SHOULD THE MANUAL OR
+ PIECE OF DOCUMENTATION PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+ NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 6. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+ REDISTRIBUTE THE MANUAL OR PIECE OF DOCUMENTATION AS PERMITTED ABOVE, BE
+ LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+ MANUAL OR PIECE OF DOCUMENTATION (INCLUDING BUT NOT LIMITED TO LOSS OF
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+ PARTIES OR A FAILURE OF A PROGRAM BASED ON THE MANUAL OR PIECE OF
+ DOCUMENTATION TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR
+ OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
diff --git a/licence/preamble.txt b/licence/preamble.txt
new file mode 100644
index 0000000..f2f1643
--- /dev/null
+++ b/licence/preamble.txt
@@ -0,0 +1,49 @@
+Preamble
+========
+
+The licensing of the wxWindows library is intended to protect the wxWindows
+library, its developers, and its users, so that the considerable investment
+it represents is not abused.
+
+Under the terms of the wxWindows Licence, you as a user are not
+obliged to distribute wxWindows source code with your products, if you
+distribute these products in binary form. However, you are prevented from
+restricting use of the library in source code form, or denying others the
+rights to use or distribute wxWindows library source code in the way
+intended.
+
+The wxWindows Licence establishes the copyright for the code and related
+material, and it gives you legal permission to copy, distribute and/or
+modify the library. It also asserts that no warranty is given by the authors
+for this or derived code.
+
+The core distribution of the wxWindows library contains files
+under two different licences:
+
+- Most files are distributed under the GNU Library General Public
+ Licence, version 2, with the special exception that you may create and
+ distribute object code versions built from the source code or modified
+ versions of it (even if these modified versions include code under a
+ different licence), and distribute such binaries under your own
+ terms.
+
+- Most core wxWindows manuals are made available under the "wxWindows
+ Free Documentation Licence", which allows you to distribute modified
+ versions of the manuals, such as versions documenting any modifications
+ made by you in your version of the library. However, you may not restrict
+ any third party from reincorporating your changes into the original
+ manuals.
+
+Other relevant files:
+
+- licence.txt: a statement that the wxWindows library is
+ covered by the GNU Library General Public Licence, with an
+ exception notice for binary distribution.
+
+- licendoc.txt: the wxWindows Documentation Licence.
+
+- lgpl.txt: the text of the GNU Library General Public Licence.
+
+- gpl.txt: the text of the GNU General Public Licence, which is
+ referenced by the LGPL.
+
diff --git a/setup.py b/setup.py
index adca6b2..6406299 100644
--- a/setup.py
+++ b/setup.py
@@ -1,41 +1,51 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
+
+
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
NAME = "XRCWidgets"
VER_MAJOR = "0"
-VER_MINOR = "9"
-VER_REL = "b1"
-VER_PATCH = ""
+VER_MINOR = "1"
+VER_REL = "1"
+VER_PATCH = "_alpha1"
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
-URL="http://www.rfk.id.au/"
+URL="http://www.rfk.id.au/software/projects/XRCWidgets/"
PACKAGES=['XRCWidgets']
DATA_FILES=[('share/XRCWidgets/examples',
['examples/simple.py',
'examples/simple.xrc']),
('share/XRCWidgets/docs',
['docs/manual.pdf',
'docs/manual.ps']),
+ ('share/XRCWidgets/docs/licence',
+ ['licence/lgpl.txt',
+ 'licence/licence.txt',
+ 'licence/licendoc.txt',
+ 'licence/preamble.txt']),
]
setup(name=NAME,
- version="%s.%s%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
+ version="%s.%s.%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
diff --git a/tools/XRCWidgets-0.1.1_alpha1.ebuild b/tools/XRCWidgets-0.1.1_alpha1.ebuild
new file mode 100644
index 0000000..4f2b9ab
--- /dev/null
+++ b/tools/XRCWidgets-0.1.1_alpha1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 2004, Ryan Kelly
+# Released under the terms of the wxWindows Licence, version 3.
+# See the file 'lincence/preamble.txt' in the main distribution for details.
+
+inherit distutils
+
+DESCRIPTION="XRCWidgets is a rapid GUI development framework for wxPython."
+SRC_URI="http://www.rfk.id.au/software/projects/XRCWidgets/rel_0_1_1_alpha1/XRCWidgets-0.1.1_alpha1.tar.gz"
+HOMEPAGE="http://www.rfk.id.au/software/projects/XRCWidgets/"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~x86"
+LICENSE="wxWinLL-3"
+
+# 2.1 gave sandbox violations see #21
+DEPEND=">=dev-lang/python-2.3
+ >=dev-python/wxPython-2.4.2.4"
+
+src_install() {
+
+ distutils_src_install
+ distutils_python_version
+
+}
+
+
+
+
|
rfk/xrcwidgets
|
e6e8a6cd47842952ee1e6b56c6638b2569a2c98d
|
*** empty log message ***
|
diff --git a/XRCWidgets/utils.py b/XRCWidgets/utils.py
index 4abd8d0..31bf940 100644
--- a/XRCWidgets/utils.py
+++ b/XRCWidgets/utils.py
@@ -1,49 +1,50 @@
"""
XRCWidgets.utils: Misc utility classes for XRCWidgets framework
"""
##
## Implementation of callable-object currying via 'lcurry' and 'rcurry'
##
class _curry:
"""Currying Base Class.
A 'curry' can be thought of as a partially-applied function call.
Some of the function's arguments are supplied when the curry is created,
the rest when it is called. In between these two stages, the curry can
be treated just like a function.
"""
def __init__(self,func,*args,**kwds):
self.func = func
self.args = args[:]
self.kwds = kwds.copy()
class lcurry(_curry):
"""Left-curry class.
This curry places positional arguments given at creation time to the left
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = self.args + args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
class rcurry(_curry):
"""Right-curry class.
This curry places positional arguments given at creation time to the right
of positional arguments given at call time.
"""
def __call__(self,*args,**kwds):
callArgs = args + self.args
callKwds = self.kwds.copy()
callKwds.update(kwds)
return self.func(*callArgs,**callKwds)
+
diff --git a/examples/simple.py b/examples/simple.py
index 91a6a94..f5beb03 100644
--- a/examples/simple.py
+++ b/examples/simple.py
@@ -1,24 +1,23 @@
from wxPython import wx
from XRCWidgets import XRCFrame
class SimpleFrame(XRCFrame):
def on_message_change(self,msg):
print "MESSAGE IS NOW:", msg.GetValue()
-
def on_ok_activate(self,bttn):
print self.getChild("message").GetValue()
def run():
app = wx.wxPySimpleApp(0)
frame = SimpleFrame(None)
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
diff --git a/setup.py b/setup.py
index 617ce01..adca6b2 100644
--- a/setup.py
+++ b/setup.py
@@ -1,36 +1,41 @@
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "9"
VER_REL = "b1"
VER_PATCH = ""
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/"
PACKAGES=['XRCWidgets']
-DATA_FILES=[('share/XRCWidgets/examples',['examples/simple.py','examples/simple.xrc']),
- ('share/XRCWidgets/docs',['docs/manual.pdf','docs/manual.ps']),
+DATA_FILES=[('share/XRCWidgets/examples',
+ ['examples/simple.py',
+ 'examples/simple.xrc']),
+ ('share/XRCWidgets/docs',
+ ['docs/manual.pdf',
+ 'docs/manual.ps']),
]
setup(name=NAME,
version="%s.%s%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
data_files=DATA_FILES,
)
+
|
rfk/xrcwidgets
|
8ac75b247d29636d97236ad3bee3e678e96b38b4
|
*** empty log message ***
|
diff --git a/MANIFEST.in b/MANIFEST.in
index e69de29..c8fe90d 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -0,0 +1,5 @@
+
+
+include examples/*
+include docs/*
+
diff --git a/setup.py b/setup.py
index 7c52857..617ce01 100644
--- a/setup.py
+++ b/setup.py
@@ -1,31 +1,36 @@
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "9"
VER_REL = "b1"
VER_PATCH = ""
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/"
PACKAGES=['XRCWidgets']
+DATA_FILES=[('share/XRCWidgets/examples',['examples/simple.py','examples/simple.xrc']),
+ ('share/XRCWidgets/docs',['docs/manual.pdf','docs/manual.ps']),
+ ]
+
setup(name=NAME,
version="%s.%s%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
+ data_files=DATA_FILES,
)
|
rfk/xrcwidgets
|
4d068eeb0e014c89f0043ad9cf9a8ca9928c590a
|
*** empty log message ***
|
diff --git a/setup.py b/setup.py
index 7e98934..7c52857 100644
--- a/setup.py
+++ b/setup.py
@@ -1,31 +1,31 @@
#
# Distutils Setup Script for XRCWidgets
#
from distutils.core import setup
NAME = "XRCWidgets"
VER_MAJOR = "0"
VER_MINOR = "9"
VER_REL = "b1"
VER_PATCH = ""
DESCRIPTION = "XRCWidgets GUI Development Framework"
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "[email protected]"
URL="http://www.rfk.id.au/"
PACKAGES=['XRCWidgets']
setup(name=NAME,
- version=".".join((VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)),
+ version="%s.%s%s%s" % (VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH),
description=DESCRIPTION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
packages=PACKAGES,
)
|
rfk/xrcwidgets
|
bc082b4fbd5314c1a7192a48fe2825590748d018
|
*** empty log message ***
|
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..e69de29
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..e69de29
diff --git a/docs/manual.lyx b/docs/manual.lyx
index 240c26f..fbbf103 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,479 +1,479 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
\spacing single
\papersize Default
\paperpackage a4
\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2.5cm
\rightmargin 2.5cm
\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
\layout Subsection
Underlying Technologies
\layout Itemize
wxWidgets is a cross-platform GUI toolkit written in C++
\newline
http://www.wxwidgets.org/
\layout Itemize
wxPython is a wxWidgets binding for the Python language
\newline
http://www.wxPython.org
\layout Itemize
XRC is a wxWidgets standard for describing the layout and content of a GUI
using an XML file
\newline
http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
\layout Subsection
Purpose
\layout Standard
The XRCWidgets framework has been designed with the primary goal of streamlining
the rapid development of GUI applications using Python.
The secondary goal is flexibility, so that everything that can be done
in a normal wxPython application can be done using XRCWidgets.
Other goals such as efficiency take lower precedence.
\layout Standard
It is envisaged that XRCWidgets would make an excellent application-prototyping
platform.
An initial version of the application can be constructed using Python and
XRCWidgets, and if final versions required greater efficiency than the
toolkit can provide then it is a simple matter to convert the XRC files
into Python or C++ code.
\layout Subsection
Advantages
\layout Subsubsection
Rapid GUI Development
\layout Standard
Using freely-available XRC editing programs, it is possible to develop a
quality interface in a fraction of the time it would take to code it by
hand.
This interface can be saved into an XRC file and easily integrated with
the rest of the application
\layout Subsubsection
Declarative Event Handling
\layout Standard
The XRCWidgets framework allows event handlers to be automatically connected
by defining them as specially-named methods of the XRCWidget class.
This saves the tedium of writing an event handling method and connecting
it by hand, and allows a number of cross-platform issues to be resolved
in a single location.
\layout Subsubsection
Separation of Layout from Code
\layout Standard
Rapid GUI development is also possible using designers that directly output
Python or C++ code.
However, it can be difficult to incorporate this code in an existing applicatio
n and it is almost impossible to reverse-engineer the code for further editing.
\layout Standard
By contrast, the use of an XRC file means that any design tool can be used
as long as it understands the standard format.
There is no tie-in to a particular development toolset.
\layout Subsubsection
Easy Conversion to Native Code
\layout Standard
If extra efficiency is required, is is trivial to transform an XRC file
into Python or C++ code that constructs the GUI natively.
\layout Subsubsection
Compatibility with Standard wxPython Code
\layout Standard
All XRCWidget objects are subclasses of the standard wxPython objects, and
behave in a compatible way.
For example, an XRCPanel is identical to a wxPanel except that it has a
bunch of child widgets created and event handlers connected as it is initialise
d.
\layout Standard
This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
that is not implemented by the XRCWidgets framework can be added using
standard wxPython techniques.
\layout Subsubsection
Simple Re-sizing of GUI
\layout Standard
Coding GUIs that look good when resized can be very tedious if done by hand.
Since XRC is based on sizers for layout, resizing of widgets works automaticall
y in most cases.
\layout Section
Classes Provided
\layout Standard
The classes provided by the XRCWidgets framework are detailed below.
\layout Subsection
XRCWidgetsError
\layout Standard
This class inherits from the python built-in Exception class, and is the
base class for all exceptions that are thrown by XRCWidgets code.
It behaves in the same way as the standard Exception class.
\layout Subsection
XRCWidget
\layout Standard
The main class provided by the package, XRCWidget is a mix-in that provides
all of the generic GUI-building and event-connecting functionality.
It provides the following methods:
\layout Itemize
getChild(cName): return a reference to the widget named <cName> in the XRC
file
\layout Itemize
createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
as a class) and creates an instance of it inside the named child widget.
\layout Itemize
showInChild(cName,widget): displays <widget> inside of the named child widget
\layout Itemize
replaceInChild(cName,widget): displays <widget> inside the named child widget,
destroying any of its previous children
\layout Standard
An XRCWidget subclass may have any number of methods named in the form
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
which will automatically be connected as event handlers.
<child> must be the name of a child from the XRC file, and <action> must
be a valid action that may be performed on that widget.
\layout Standard
Actions may associate with different events depending on the type of the
child widget.
Valid actions include:
\layout Itemize
change: Called when the contents of the widget have changed (eg change a
text box's contents)
\layout Itemize
activate: Called when the widget is activated by the user (eg click on a
button)
\layout Itemize
content: Called at creation time to obtain the content for the child widget.
This may be used as a shortcut to using
\begin_inset Quotes eld
\end_inset
replaceInChild
\begin_inset Quotes erd
\end_inset
in the constructor
\layout Subsection
XRCPanel
\layout Standard
XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
functionality to initialise a wxPanel from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCDialog
\layout Standard
XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
functionality to initialise a wxDialog from an XRC resource file.
It provides no additional methods.
\layout Subsection
XRCFrame
\layout Standard
XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
functionality to initialise a wxFrame from an XRC resource file.
It provides no additional methods.
\layout Section
Tutorial
\layout Standard
This section provides a quick tutorial for creating a widget using the XRCWidget
s framework.
The widget in question is to be called 'SimpleFrame', and will live in
the file 'simple.py'.
We will create a wxFrame with a text-box and a button, which prints a message
to the terminal when the button is clicked.
The frame will look something like this:
\layout Standard
\added_space_top smallskip \added_space_bottom smallskip \align center
\begin_inset Graphics
filename SimpleFrame.eps
scale 75
keepAspectRatio
\end_inset
\layout Standard
It will be necessary to create two files: 'simple.py' containing the python
code, and 'simple.xrc' containing the XRC definitions.
\layout Standard
For additional examples of the toolkit in action, see the 'examples' directory
of the distribution.
\layout Subsection
Creating the XRC File
\layout Standard
There are many ways to create an XRC file.
The author recommends using wxGlade, a RAD GUI designer itself written
in wxPython.
It is available from http://wxglade.sourceforge.net/.
\layout Standard
Launching wxGlade should result it an empty Application being displayed.
First, set up the properties of the application to produce the desired
output.
In the 'Properties' window, select XRC as the output language and enter
'simple.xrc' as the output path.
\layout Standard
Now to create the widget.
From the main toolbar window, select the
\begin_inset Quotes eld
\end_inset
Add a Frame
\begin_inset Quotes erd
\end_inset
button.
Make sure that the class of the frame is 'wxFrame' and click OK.
In the Properties window set the name of the widget to
\begin_inset Quotes eld
\end_inset
SimpleFrame
\begin_inset Quotes erd
\end_inset
- this is to correspond to the name of the class that is to be created.
\layout Standard
Populate the frame with whatever contents you like, using sizers to lay
them out appropriately.
Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
for more details.
Make sure that you include a text control named
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
and a button named
\begin_inset Quotes eld
\end_inset
ok
\begin_inset Quotes erd
\end_inset
.
\layout Standard
When the frame is finished, selected Generate Code from the File menu to
produce the XRC file.
You may also like to save the wxGlade Application so that it can be edited
later.
Alternately, wxGlade provides the tool
\begin_inset Quotes eld
\end_inset
xrc2wxg
\begin_inset Quotes erd
\end_inset
which can convert from the XRC file to a wxGlade project file.
\layout Subsection
Creating the Python Code
\layout Standard
You should now have the file 'simple.xrc'.
If you like, open it up in a text editor to see how the code is produced.
If you are familiar with HTML or other forms of XML, you should be able
to get an idea of what the contents mean.
\layout Standard
Next, create the python file 'simple.py' using the following code:
\layout LyX-Code
from XRCWidgets import XRCFrame
\layout LyX-Code
class SimpleFrame(XRCFrame):
\layout LyX-Code
def on_message_change(self,msg):
\layout LyX-Code
print
\begin_inset Quotes eld
\end_inset
MESSAGE IS NOW:
\begin_inset Quotes erd
\end_inset
, msg.GetValue()
\layout LyX-Code
def on_ok_activate(self,bttn):
\layout LyX-Code
print self.getChild(
\begin_inset Quotes eld
\end_inset
message
\begin_inset Quotes erd
\end_inset
).GetValue()
\layout Standard
This code is all that is required to make a functioning frame.
Notice that the defined methods meet the general format of
\begin_inset Quotes eld
\end_inset
on_<child>_<action>
\begin_inset Quotes erd
\end_inset
and so will be automatically connected as event handlers.
The
\begin_inset Quotes eld
\end_inset
on_message_change
\begin_inset Quotes erd
\end_inset
method will be called whenever the text in the message box is changed,
and
\begin_inset Quotes eld
\end_inset
on_ok_activate
\begin_inset Quotes erd
\end_inset
will be called whenever the button is clicked.
\layout Subsection
Testing the Widget
\layout Standard
Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
to put the widget into action.
Launch a python shell and execute the following commands:
\layout LyX-Code
-from wxPython.wx import *
+from simple import SimpleFrame
\layout LyX-Code
-from simple import SimpleFrame
+from wxPython.wx import *
\layout LyX-Code
app = wxPySimpleApp(0)
\layout LyX-Code
frame = SimpleFrame(None)
\layout LyX-Code
app.SetTopWindow(frame)
\layout LyX-Code
frame.Show()
\layout LyX-Code
app.MainLoop()
\layout Standard
This code imports the widget's definition, creates a wxPython application,
and runs it using SimpleFrame as its top level window.
The frame should appear and allow you to interact with it, printing messages
to the console as the button is clicked or the message text is changed.
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\layout LyX-Code
\the_end
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..7e98934
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,31 @@
+#
+# Distutils Setup Script for XRCWidgets
+#
+
+from distutils.core import setup
+
+NAME = "XRCWidgets"
+
+VER_MAJOR = "0"
+VER_MINOR = "9"
+VER_REL = "b1"
+VER_PATCH = ""
+
+DESCRIPTION = "XRCWidgets GUI Development Framework"
+AUTHOR = "Ryan Kelly"
+AUTHOR_EMAIL = "[email protected]"
+URL="http://www.rfk.id.au/"
+
+
+PACKAGES=['XRCWidgets']
+
+
+
+setup(name=NAME,
+ version=".".join((VER_MAJOR,VER_MINOR,VER_REL,VER_PATCH)),
+ description=DESCRIPTION,
+ author=AUTHOR,
+ author_email=AUTHOR_EMAIL,
+ url=URL,
+ packages=PACKAGES,
+ )
|
rfk/xrcwidgets
|
e6e6e1c69f8f1d0595aa4bc0b2c93edeb3940900
|
*** empty log message ***
|
diff --git a/docs/manual.lyx b/docs/manual.lyx
index e581288..240c26f 100644
--- a/docs/manual.lyx
+++ b/docs/manual.lyx
@@ -1,47 +1,479 @@
#LyX 1.3 created this file. For more info see http://www.lyx.org/
\lyxformat 221
\textclass article
\language english
\inputencoding auto
\fontscheme default
\graphics default
\paperfontsize default
+\spacing single
\papersize Default
\paperpackage a4
-\use_geometry 0
+\use_geometry 1
\use_amsmath 0
\use_natbib 0
\use_numerical_citations 0
\paperorientation portrait
+\leftmargin 2.5cm
+\topmargin 2.5cm
+\rightmargin 2.5cm
+\bottommargin 2.5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation indent
\defskip medskip
\quotes_language english
\quotes_times 2
\papercolumns 1
\papersides 1
\paperpagestyle default
\layout Title
The XRCWidgets Package
\layout Author
Ryan Kelly ([email protected])
\layout Section
Introduction
\layout Standard
The XRCWidgets package is a Python extension to the popular wxWidgets library.
It is designed to allow the rapid development of graphical applications
by leveraging the dynamic run-type capabilities of Python and the XML-based
resource specification scheme XRC.
+\layout Subsection
+
+Underlying Technologies
+\layout Itemize
+
+wxWidgets is a cross-platform GUI toolkit written in C++
+\newline
+http://www.wxwidgets.org/
+\layout Itemize
+
+wxPython is a wxWidgets binding for the Python language
+\newline
+http://www.wxPython.org
+\layout Itemize
+
+XRC is a wxWidgets standard for describing the layout and content of a GUI
+ using an XML file
+\newline
+http://www.wxwidgets.org/manuals/2.4.2/wx478.htm
+\layout Subsection
+
+Purpose
+\layout Standard
+
+The XRCWidgets framework has been designed with the primary goal of streamlining
+ the rapid development of GUI applications using Python.
+ The secondary goal is flexibility, so that everything that can be done
+ in a normal wxPython application can be done using XRCWidgets.
+ Other goals such as efficiency take lower precedence.
+\layout Standard
+
+It is envisaged that XRCWidgets would make an excellent application-prototyping
+ platform.
+ An initial version of the application can be constructed using Python and
+ XRCWidgets, and if final versions required greater efficiency than the
+ toolkit can provide then it is a simple matter to convert the XRC files
+ into Python or C++ code.
+\layout Subsection
+
+Advantages
+\layout Subsubsection
+
+Rapid GUI Development
+\layout Standard
+
+Using freely-available XRC editing programs, it is possible to develop a
+ quality interface in a fraction of the time it would take to code it by
+ hand.
+ This interface can be saved into an XRC file and easily integrated with
+ the rest of the application
+\layout Subsubsection
+
+Declarative Event Handling
+\layout Standard
+
+The XRCWidgets framework allows event handlers to be automatically connected
+ by defining them as specially-named methods of the XRCWidget class.
+ This saves the tedium of writing an event handling method and connecting
+ it by hand, and allows a number of cross-platform issues to be resolved
+ in a single location.
+\layout Subsubsection
+
+Separation of Layout from Code
+\layout Standard
+
+Rapid GUI development is also possible using designers that directly output
+ Python or C++ code.
+ However, it can be difficult to incorporate this code in an existing applicatio
+n and it is almost impossible to reverse-engineer the code for further editing.
+\layout Standard
+
+By contrast, the use of an XRC file means that any design tool can be used
+ as long as it understands the standard format.
+ There is no tie-in to a particular development toolset.
+\layout Subsubsection
+
+Easy Conversion to Native Code
+\layout Standard
+
+If extra efficiency is required, is is trivial to transform an XRC file
+ into Python or C++ code that constructs the GUI natively.
+\layout Subsubsection
+
+Compatibility with Standard wxPython Code
+\layout Standard
+
+All XRCWidget objects are subclasses of the standard wxPython objects, and
+ behave in a compatible way.
+ For example, an XRCPanel is identical to a wxPanel except that it has a
+ bunch of child widgets created and event handlers connected as it is initialise
+d.
+\layout Standard
+
+This allows XRCWidgets to mix with hand-coded wxPython widgets, and behavior
+ that is not implemented by the XRCWidgets framework can be added using
+ standard wxPython techniques.
+\layout Subsubsection
+
+Simple Re-sizing of GUI
+\layout Standard
+
+Coding GUIs that look good when resized can be very tedious if done by hand.
+ Since XRC is based on sizers for layout, resizing of widgets works automaticall
+y in most cases.
+\layout Section
+
+Classes Provided
+\layout Standard
+
+The classes provided by the XRCWidgets framework are detailed below.
+\layout Subsection
+
+XRCWidgetsError
+\layout Standard
+
+This class inherits from the python built-in Exception class, and is the
+ base class for all exceptions that are thrown by XRCWidgets code.
+ It behaves in the same way as the standard Exception class.
+\layout Subsection
+
+XRCWidget
+\layout Standard
+
+The main class provided by the package, XRCWidget is a mix-in that provides
+ all of the generic GUI-building and event-connecting functionality.
+ It provides the following methods:
+\layout Itemize
+
+getChild(cName): return a reference to the widget named <cName> in the XRC
+ file
+\layout Itemize
+
+createInChild(cName,toCreate,*args): takes a wxPython widget factory (such
+ as a class) and creates an instance of it inside the named child widget.
+\layout Itemize
+
+showInChild(cName,widget): displays <widget> inside of the named child widget
+\layout Itemize
+
+replaceInChild(cName,widget): displays <widget> inside the named child widget,
+ destroying any of its previous children
+\layout Standard
+
+An XRCWidget subclass may have any number of methods named in the form
+\begin_inset Quotes eld
+\end_inset
+
+on_<child>_<action>
+\begin_inset Quotes erd
+\end_inset
+
+ which will automatically be connected as event handlers.
+ <child> must be the name of a child from the XRC file, and <action> must
+ be a valid action that may be performed on that widget.
+\layout Standard
+
+Actions may associate with different events depending on the type of the
+ child widget.
+ Valid actions include:
+\layout Itemize
+
+change: Called when the contents of the widget have changed (eg change a
+ text box's contents)
+\layout Itemize
+
+activate: Called when the widget is activated by the user (eg click on a
+ button)
+\layout Itemize
+
+content: Called at creation time to obtain the content for the child widget.
+ This may be used as a shortcut to using
+\begin_inset Quotes eld
+\end_inset
+
+replaceInChild
+\begin_inset Quotes erd
+\end_inset
+
+ in the constructor
+\layout Subsection
+
+XRCPanel
+\layout Standard
+
+XRCPanel inherits from XRCWidget and wxPanel, implementing the necessary
+ functionality to initialise a wxPanel from an XRC resource file.
+ It provides no additional methods.
+\layout Subsection
+
+XRCDialog
+\layout Standard
+
+XRCDialog inherits from XRCWidget and wxDialog, implementing the necessary
+ functionality to initialise a wxDialog from an XRC resource file.
+ It provides no additional methods.
+\layout Subsection
+
+XRCFrame
+\layout Standard
+
+XRCFrame inherits from XRCWidget and wxFrame, implementing the necessary
+ functionality to initialise a wxFrame from an XRC resource file.
+ It provides no additional methods.
+\layout Section
+
+Tutorial
+\layout Standard
+
+This section provides a quick tutorial for creating a widget using the XRCWidget
+s framework.
+ The widget in question is to be called 'SimpleFrame', and will live in
+ the file 'simple.py'.
+ We will create a wxFrame with a text-box and a button, which prints a message
+ to the terminal when the button is clicked.
+ The frame will look something like this:
\layout Standard
+\added_space_top smallskip \added_space_bottom smallskip \align center
+
+\begin_inset Graphics
+ filename SimpleFrame.eps
+ scale 75
+ keepAspectRatio
+
+\end_inset
+
+
+\layout Standard
+
+It will be necessary to create two files: 'simple.py' containing the python
+ code, and 'simple.xrc' containing the XRC definitions.
+\layout Standard
+
+For additional examples of the toolkit in action, see the 'examples' directory
+ of the distribution.
+\layout Subsection
+
+Creating the XRC File
+\layout Standard
+
+There are many ways to create an XRC file.
+ The author recommends using wxGlade, a RAD GUI designer itself written
+ in wxPython.
+ It is available from http://wxglade.sourceforge.net/.
+\layout Standard
+
+Launching wxGlade should result it an empty Application being displayed.
+ First, set up the properties of the application to produce the desired
+ output.
+ In the 'Properties' window, select XRC as the output language and enter
+ 'simple.xrc' as the output path.
+\layout Standard
+
+Now to create the widget.
+ From the main toolbar window, select the
+\begin_inset Quotes eld
+\end_inset
+
+Add a Frame
+\begin_inset Quotes erd
+\end_inset
+
+ button.
+ Make sure that the class of the frame is 'wxFrame' and click OK.
+ In the Properties window set the name of the widget to
+\begin_inset Quotes eld
+\end_inset
+
+SimpleFrame
+\begin_inset Quotes erd
+\end_inset
+
+ - this is to correspond to the name of the class that is to be created.
+\layout Standard
+
+Populate the frame with whatever contents you like, using sizers to lay
+ them out appropriately.
+ Consult the wxGlade tutorial (http://wxglade.sourceforge.net/tutorial.php)
+ for more details.
+ Make sure that you include a text control named
+\begin_inset Quotes eld
+\end_inset
+
+message
+\begin_inset Quotes erd
+\end_inset
+
+ and a button named
+\begin_inset Quotes eld
+\end_inset
+
+ok
+\begin_inset Quotes erd
+\end_inset
+
+.
+\layout Standard
+
+When the frame is finished, selected Generate Code from the File menu to
+ produce the XRC file.
+ You may also like to save the wxGlade Application so that it can be edited
+ later.
+ Alternately, wxGlade provides the tool
+\begin_inset Quotes eld
+\end_inset
+
+xrc2wxg
+\begin_inset Quotes erd
+\end_inset
+
+ which can convert from the XRC file to a wxGlade project file.
+\layout Subsection
+
+Creating the Python Code
+\layout Standard
+
+You should now have the file 'simple.xrc'.
+ If you like, open it up in a text editor to see how the code is produced.
+ If you are familiar with HTML or other forms of XML, you should be able
+ to get an idea of what the contents mean.
+\layout Standard
+
+Next, create the python file 'simple.py' using the following code:
+\layout LyX-Code
+
+from XRCWidgets import XRCFrame
+\layout LyX-Code
+
+class SimpleFrame(XRCFrame):
+\layout LyX-Code
+
+ def on_message_change(self,msg):
+\layout LyX-Code
+
+ print
+\begin_inset Quotes eld
+\end_inset
+
+MESSAGE IS NOW:
+\begin_inset Quotes erd
+\end_inset
+
+, msg.GetValue()
+\layout LyX-Code
+
+ def on_ok_activate(self,bttn):
+\layout LyX-Code
+
+ print self.getChild(
+\begin_inset Quotes eld
+\end_inset
+
+message
+\begin_inset Quotes erd
+\end_inset
+
+).GetValue()
+\layout Standard
+
+This code is all that is required to make a functioning frame.
+ Notice that the defined methods meet the general format of
+\begin_inset Quotes eld
+\end_inset
+
+on_<child>_<action>
+\begin_inset Quotes erd
+\end_inset
+
+ and so will be automatically connected as event handlers.
+ The
+\begin_inset Quotes eld
+\end_inset
+
+on_message_change
+\begin_inset Quotes erd
+\end_inset
+
+ method will be called whenever the text in the message box is changed,
+ and
+\begin_inset Quotes eld
+\end_inset
+
+on_ok_activate
+\begin_inset Quotes erd
+\end_inset
+
+ will be called whenever the button is clicked.
+\layout Subsection
+
+Testing the Widget
+\layout Standard
+
+Once you have the files 'simple.py' and 'simple.xrc' ready, it is possible
+ to put the widget into action.
+ Launch a python shell and execute the following commands:
+\layout LyX-Code
+
+from wxPython.wx import *
+\layout LyX-Code
+
+from simple import SimpleFrame
+\layout LyX-Code
+
+app = wxPySimpleApp(0)
+\layout LyX-Code
+
+frame = SimpleFrame(None)
+\layout LyX-Code
+
+app.SetTopWindow(frame)
+\layout LyX-Code
+
+frame.Show()
+\layout LyX-Code
+
+app.MainLoop()
+\layout Standard
+
+This code imports the widget's definition, creates a wxPython application,
+ and runs it using SimpleFrame as its top level window.
+ The frame should appear and allow you to interact with it, printing messages
+ to the console as the button is clicked or the message text is changed.
+\layout LyX-Code
+
+\layout LyX-Code
+
+\layout LyX-Code
+
+\layout LyX-Code
+
+\layout LyX-Code
+
+\layout LyX-Code
-XRC is a wxWidgets standard for describing the layout and content of an
- interface as an XML file.
- There are many tools available for producing/editing XRC files - the author
- recommends wxGlade (http://wxglade.sourceforge.net/)
\the_end
|
rfk/xrcwidgets
|
f89f331e4417dfdb18ca70cb5a95c8da4d7c14d3
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index a21c0cc..0bad6b7 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,318 +1,369 @@
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
from utils import lcurry
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
+ # Location of the XRC file to load content from
+ # Can be set at class-level in the subclass to force a specific location
+ _xrcfile = None
+
+ # Name of the XRC file to load content from
+ # Will be searched for along the default XRC file path
+ # Set at class-level in the subclass to force a specific name
+ _xrcfilename = None
def __init__(self,parent):
- self._xrcfile = self._findXRCFile()
+ if self._xrcfile is None:
+ self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
self._connectEventMethods()
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
- filePath = "/".join(cls.__module__.split(".")) + ".xrc"
+ if cls._xrcfilename is None:
+ filePath = "/".join(cls.__module__.split(".")) + ".xrc"
+ else:
+ filePath = self._xrcfilename
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
- yield os.normpath(os.join(sys.prefix,"share/XRCWidgets/data"))
+ yield os.path.normpath(os.path.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the desired parent of the to-be-created widget.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
self._loadOn(self._xrcres,pre,parent,self.__class__.__name__)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
##
## Methods for manipulating child widgets
##
def _getChildName(self,cName):
"""This method allows name-mangling to be inserted, if required."""
return cName
def getChild(self,cName):
"""Lookup and return a child widget by name."""
chld = xrc.XRCCTRL(self,self._getChildName(cName))
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
+ return chld
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
- <toCreate> should be a callable returning the widget instance (usually
- its class) that takes the new widget's parent as first argument. It
+ <toCreate> should be a callable (usually a class) returning the widget
+ instance. It must take the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
for c in window.GetChildren():
sizer.Remove(c)
c.Hide()
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
##
## Methods for helping to connect event handlers
##
def _connectEventMethods(self):
"""Automatically connect specially named methods as event handlers.
An XRCWidget subclass may provide any number of methods named in the
form 'on_<cname>_<action>' where <cname> is the name of a child
widget from the XRC file and <action> is an event identifier appropiate
for that widget type. This method sets up the necessary event
connections to ensure that such methods are called when appropriate.
"""
prfx = "on_"
for mName in dir(self):
if mName.startswith(prfx):
for action in self._EVT_ACTIONS:
sffx = "_"+action
if mName.endswith(sffx):
chldName = mName[len(prfx):-1*len(sffx)]
chld = self.getChild(chldName)
cnctFuncName = self._EVT_ACTIONS[action]
cnctFunc = getattr(self,cnctFuncName)
cnctFunc(chld,mName)
break
## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
## of methods of this class that should be used to connect events for
## that action. Such methods must take the child widget in question
## and the name of the method to connect to, and need not return any
## value.
_EVT_ACTIONS = {
"change": "_connectAction_Change",
"content": "_connectAction_Content",
+ "activate": "_connectAction_Activate",
}
- def _connectAction_Change(self,chld,mName):
- """Arrange to call method <mName> when <chld>'s value is changed.
+ def _connectAction_Change(self,child,mName):
+ """Arrange to call method <mName> when <child>'s value is changed.
The events connected by this method will be different depending on the
- precise type of <chld>. The method to be called should expect the
+ precise type of <child>. The method to be called should expect the
control itself as its only argument. It will be wrapped so that the
event is skipped in order to avoid a lot of cross-platform issues.
"""
# retreive the method to be called and wrap it appropriately
handler = getattr(self,mName)
- handler = lcurry(handler,chld)
+ handler = lcurry(handler,child)
handler = lcurry(_EvtHandleAndSkip,handler)
# enourmous switch on child widget type
- if isinstance(chld,wx.TextCtrl) or isinstance(chld,wx.TextCtrlPtr):
- EVT_TEXT_ENTER(self,ctrl.GetId(),handler)
- EVT_KILL_FOCUS(ctrl,handler)
- elif isinstance(chld,wx.CheckBox) or isinstance(chld,wx.CheckBoxPtr):
- EVT_CHECKBOX(self,ctrl.GetId(),handler)
- elif isinstance(chld,wx.CheckBox) or isinstance(chld,wx.CheckBoxPtr):
- pass
+ if isinstance(child,wx.TextCtrl) or isinstance(child,wx.TextCtrlPtr):
+ wx.EVT_TEXT_ENTER(self,child.GetId(),handler)
+ wx.EVT_KILL_FOCUS(child,handler)
+ elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
+ wx.EVT_CHECKBOX(self,child.GetId(),handler)
else:
- eStr = "Widget type not supported by 'Change' action."
- raise XRCWidgetsError(eStr)
+ eStr = "Widget type <%s> not supported by 'Change' action."
+ raise XRCWidgetsError(eStr % child.__class__)
+
+
+
+ def _connectAction_Content(self,child,mName):
+ """Replace the content of <child> with that returned by method <mName>.
+
+ Strictly, this is not an 'event' handler as it only performs actions
+ on initialisation. It is however a useful piece of functionality and
+ fits nicely in the framework. The method <mName> will be called with
+ <child> as its only argument, and should return a wxWindow. This
+ window will be shown as the only content of <child>.
+ """
+ mthd = getattr(self,mName)
+ widget = mthd(child)
+ self.replaceInWindow(child,widget)
+
+
+ def _connectAction_Activate(self,child,mName):
+ """Arrange to call method <mName> when <child> is activated.
+ The events connected by this method will be different depending on the
+ precise type of <child>. The method to be called should expect the
+ control itself as its only argument.
+ """
+ handler = getattr(self,mName)
+ handler = lcurry(handler,child)
+ handler = lcurry(_EvtHandle,handler)
+
+ # enourmous switch on child widget type
+ if isinstance(child,wx.Button) or isinstance(child,wx.ButtonPtr):
+ wx.EVT_BUTTON(self,child.GetId(),handler)
+ elif isinstance(child,wx.CheckBox) or isinstance(child,wx.CheckBoxPtr):
+ wx.EVT_CHECKBOX(self,child.GetId(),handler)
+ else:
+ eStr = "Widget type <%s> not supported by 'Activate' action."
+ raise XRCWidgetsError(eStr % child.__class__)
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Panel.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
- def __init__(self,parent,*args):
- wx.Frame.__init__(self,parent,*args)
+ def __init__(self,parent,ID=-1,title="Untitled Frame",*args):
+ wx.Frame.__init__(self,parent,ID,title,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Dialog.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
########
##
## Miscellaneous Useful Functions
##
########
+
+def _EvtHandle(toCall,evnt):
+ toCall()
+
def _EvtHandleAndSkip(toCall,evnt):
"""Handle an event by invoking <toCall> then <evnt>.Skip().
This function does *not* pass <evnt> as an argument to <toCall>,
it simply invokes it directly.
"""
toCall()
evnt.Skip()
diff --git a/docs/manual.lyx b/docs/manual.lyx
new file mode 100644
index 0000000..e581288
--- /dev/null
+++ b/docs/manual.lyx
@@ -0,0 +1,47 @@
+#LyX 1.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 221
+\textclass article
+\language english
+\inputencoding auto
+\fontscheme default
+\graphics default
+\paperfontsize default
+\papersize Default
+\paperpackage a4
+\use_geometry 0
+\use_amsmath 0
+\use_natbib 0
+\use_numerical_citations 0
+\paperorientation portrait
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language english
+\quotes_times 2
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+
+\layout Title
+
+The XRCWidgets Package
+\layout Author
+
+Ryan Kelly ([email protected])
+\layout Section
+
+Introduction
+\layout Standard
+
+The XRCWidgets package is a Python extension to the popular wxWidgets library.
+ It is designed to allow the rapid development of graphical applications
+ by leveraging the dynamic run-type capabilities of Python and the XML-based
+ resource specification scheme XRC.
+\layout Standard
+
+XRC is a wxWidgets standard for describing the layout and content of an
+ interface as an XML file.
+ There are many tools available for producing/editing XRC files - the author
+ recommends wxGlade (http://wxglade.sourceforge.net/)
+\the_end
diff --git a/examples/simple.py b/examples/simple.py
new file mode 100644
index 0000000..91a6a94
--- /dev/null
+++ b/examples/simple.py
@@ -0,0 +1,24 @@
+
+
+from wxPython import wx
+from XRCWidgets import XRCFrame
+
+
+class SimpleFrame(XRCFrame):
+
+ def on_message_change(self,msg):
+ print "MESSAGE IS NOW:", msg.GetValue()
+
+
+ def on_ok_activate(self,bttn):
+ print self.getChild("message").GetValue()
+
+
+
+def run():
+ app = wx.wxPySimpleApp(0)
+ frame = SimpleFrame(None)
+ app.SetTopWindow(frame)
+ frame.Show()
+ app.MainLoop()
+
diff --git a/examples/simple.xrc b/examples/simple.xrc
new file mode 100644
index 0000000..599e47a
--- /dev/null
+++ b/examples/simple.xrc
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ANSI_X3.4-1968"?>
+<!-- generated by wxGlade 0.3.2 on Fri May 7 21:52:50 2004 -->
+
+<resource version="2.3.0.1">
+ <object class="wxFrame" name="SimpleFrame">
+ <style>wxDEFAULT_FRAME_STYLE</style>
+ <size>300, 120</size>
+ <title>Simple Frame</title>
+ <object class="wxPanel">
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxEXPAND</flag>
+ <object class="wxPanel" name="panel_1">
+ <style>wxTAB_TRAVERSAL</style>
+ <object class="wxBoxSizer">
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_HORIZONTAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxRIGHT|wxALIGN_CENTER_VERTICAL</flag>
+ <border>10</border>
+ <object class="wxStaticText" name="label_1">
+ <label>Message: </label>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxTextCtrl" name="message">
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="sizeritem">
+ <option>1</option>
+ <flag>wxALIGN_CENTER_HORIZONTAL</flag>
+ <object class="wxBoxSizer">
+ <orient>wxHORIZONTAL</orient>
+ <object class="sizeritem">
+ <flag>wxALIGN_CENTER_VERTICAL</flag>
+ <object class="wxButton" name="ok">
+ <label>OK</label>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+</resource>
|
rfk/xrcwidgets
|
042e3cd48005c5e08a7cf0aff3edafd46020e7f2
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 4f7e0bd..a21c0cc 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,234 +1,318 @@
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
+from utils import lcurry
+
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
def __init__(self,parent):
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
+ self._connectEventMethods()
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.normpath(os.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
- <parent> must be the parent of the to-be-created widget.
+ <parent> must be the desired parent of the to-be-created widget.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
self._loadOn(self._xrcres,pre,parent,self.__class__.__name__)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
+ ##
## Methods for manipulating child widgets
+ ##
def _getChildName(self,cName):
"""This method allows name-mangling to be inserted, if required."""
return cName
def getChild(self,cName):
"""Lookup and return a child widget by name."""
chld = xrc.XRCCTRL(self,self._getChildName(cName))
if chld is None:
raise XRCWidgetsError("Child '%s' not found" % (cName,))
def createInChild(self,cName,toCreate,*args):
"""Create a Widget inside the named child.
<toCreate> should be a callable returning the widget instance (usually
its class) that takes the new widget's parent as first argument. It
will be called as:
toCreate(self.getChild(cName),*args)
The newly created widget will be displayed as the only content of the
named child, expanded inside a sizer. A reference to it will also be
returned.
"""
chld = self.getChild(cName)
newWidget = toCreate(chld,*args)
self.showInWindow(chld,newWidget)
return newWidget
def showInChild(self,cName,widget):
"""Show the given widget inside the named child.
The widget is expected to have the child as its parent. It will be
shown in an expandable sizer as the child's only content.
"""
self.showInWindow(self.getChild(cName),widget)
def replaceInChild(self,cName,widget):
"""As with showInChild, but destroys the child's previous contents."""
self.replaceInWindow(self.getChild(cName),widget)
def showInWindow(self,window,widget):
"""Show the given widget inside the given window.
The widget is expected to have the window as its parent. It will be
shown in an expandable sizer as the windows's only content.
Any widgets that are currently children of the window will be hidden,
and a list of references to them will be returned.
"""
oldChildren = []
sizer = window.GetSizer()
if sizer is None:
sizer = wx.BoxSizer(wx.HORIZONTAL)
else:
for c in window.GetChildren():
sizer.Remove(c)
c.Hide()
oldChildren.append(c)
sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
widget.Show()
sizer.Layout()
window.SetSizer(sizer,False)
window.Layout()
def replaceInWindow(self,window,widget):
"""As with showInWindow, but destroys the window's previous contents.
Does not return a list of references.
"""
oldChildren = self.showInWindow(window,widget)
for c in oldChildren:
c.Destroy()
+ ##
+ ## Methods for helping to connect event handlers
+ ##
+
+ def _connectEventMethods(self):
+ """Automatically connect specially named methods as event handlers.
+
+ An XRCWidget subclass may provide any number of methods named in the
+ form 'on_<cname>_<action>' where <cname> is the name of a child
+ widget from the XRC file and <action> is an event identifier appropiate
+ for that widget type. This method sets up the necessary event
+ connections to ensure that such methods are called when appropriate.
+ """
+ prfx = "on_"
+ for mName in dir(self):
+ if mName.startswith(prfx):
+ for action in self._EVT_ACTIONS:
+ sffx = "_"+action
+ if mName.endswith(sffx):
+ chldName = mName[len(prfx):-1*len(sffx)]
+ chld = self.getChild(chldName)
+ cnctFuncName = self._EVT_ACTIONS[action]
+ cnctFunc = getattr(self,cnctFuncName)
+ cnctFunc(chld,mName)
+ break
+
+ ## _EVT_ACTIONS is a dictionary mapping the names of actions to the names
+ ## of methods of this class that should be used to connect events for
+ ## that action. Such methods must take the child widget in question
+ ## and the name of the method to connect to, and need not return any
+ ## value.
+
+ _EVT_ACTIONS = {
+ "change": "_connectAction_Change",
+ "content": "_connectAction_Content",
+ }
+
+
+ def _connectAction_Change(self,chld,mName):
+ """Arrange to call method <mName> when <chld>'s value is changed.
+ The events connected by this method will be different depending on the
+ precise type of <chld>. The method to be called should expect the
+ control itself as its only argument. It will be wrapped so that the
+ event is skipped in order to avoid a lot of cross-platform issues.
+ """
+ # retreive the method to be called and wrap it appropriately
+ handler = getattr(self,mName)
+ handler = lcurry(handler,chld)
+ handler = lcurry(_EvtHandleAndSkip,handler)
+
+ # enourmous switch on child widget type
+ if isinstance(chld,wx.TextCtrl) or isinstance(chld,wx.TextCtrlPtr):
+ EVT_TEXT_ENTER(self,ctrl.GetId(),handler)
+ EVT_KILL_FOCUS(ctrl,handler)
+ elif isinstance(chld,wx.CheckBox) or isinstance(chld,wx.CheckBoxPtr):
+ EVT_CHECKBOX(self,ctrl.GetId(),handler)
+ elif isinstance(chld,wx.CheckBox) or isinstance(chld,wx.CheckBoxPtr):
+ pass
+ else:
+ eStr = "Widget type not supported by 'Change' action."
+ raise XRCWidgetsError(eStr)
+
+
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Panel.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Frame.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Dialog.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
+########
+##
+## Miscellaneous Useful Functions
+##
+########
+
+def _EvtHandleAndSkip(toCall,evnt):
+ """Handle an event by invoking <toCall> then <evnt>.Skip().
+ This function does *not* pass <evnt> as an argument to <toCall>,
+ it simply invokes it directly.
+ """
+ toCall()
+ evnt.Skip()
+
+
+
diff --git a/XRCWidgets/utils.py b/XRCWidgets/utils.py
new file mode 100644
index 0000000..4abd8d0
--- /dev/null
+++ b/XRCWidgets/utils.py
@@ -0,0 +1,49 @@
+"""
+
+ XRCWidgets.utils: Misc utility classes for XRCWidgets framework
+
+"""
+
+
+##
+## Implementation of callable-object currying via 'lcurry' and 'rcurry'
+##
+
+class _curry:
+ """Currying Base Class.
+ A 'curry' can be thought of as a partially-applied function call.
+ Some of the function's arguments are supplied when the curry is created,
+ the rest when it is called. In between these two stages, the curry can
+ be treated just like a function.
+ """
+
+ def __init__(self,func,*args,**kwds):
+ self.func = func
+ self.args = args[:]
+ self.kwds = kwds.copy()
+
+
+class lcurry(_curry):
+ """Left-curry class.
+ This curry places positional arguments given at creation time to the left
+ of positional arguments given at call time.
+ """
+
+ def __call__(self,*args,**kwds):
+ callArgs = self.args + args
+ callKwds = self.kwds.copy()
+ callKwds.update(kwds)
+ return self.func(*callArgs,**callKwds)
+
+class rcurry(_curry):
+ """Right-curry class.
+ This curry places positional arguments given at creation time to the right
+ of positional arguments given at call time.
+ """
+
+ def __call__(self,*args,**kwds):
+ callArgs = args + self.args
+ callKwds = self.kwds.copy()
+ callKwds.update(kwds)
+ return self.func(*callArgs,**callKwds)
+
|
rfk/xrcwidgets
|
928729c75643dc0e4ac8c5da711825670a05b9f6
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
index 01d191d..4f7e0bd 100644
--- a/XRCWidgets/__init__.py
+++ b/XRCWidgets/__init__.py
@@ -1,159 +1,234 @@
"""
XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
XRC is a wxWidgets standard for describing a GUI in an XML file. This module
provides facilities to easily incorporate GUI components ('widgets') whose
layout is defined in such a file.
"""
import sys
import os
import wx
from wx import xrc
########
##
## Module-Specific Exception Classes
##
########
class XRCWidgetsError(Exception):
"""Base class for XRCWidgets-specific Exceptions."""
pass
########
##
## Base XRCWidget Class
##
########
class XRCWidget:
"""Mix-in Class providing basic XRC behaviors.
Classes inheriting from this class should also inherit from one of the
wxPython GUI classes that can be loaded from an XRC file - for example,
wxPanel or wxFrame. This class provides the mechanisms for automatically
locating the XRC file and loading the definitions from it.
"""
def __init__(self,parent):
self._xrcfile = self._findXRCFile()
self._loadXRCFile(self._xrcfile,parent)
## Methods for dealing with XRC resource files
def _findXRCFile(cls):
"""Locate the XRC file for this class, and return its location.
The name of the XRC file is constructed from the name of the class
and its defining module. If this class is named <ClassName> and is
defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
The locations within the filesystem which are to be searched are
obtained from the _getXRCFileLocations() method.
"""
filePath = "/".join(cls.__module__.split(".")) + ".xrc"
for fileLoc in cls._getXRCFileLocations():
pth = os.path.join(fileLoc,filePath)
if os.path.exists(pth):
return pth
raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
_findXRCFile = classmethod(_findXRCFile)
def _getXRCFileLocations():
"""Iterator over the possible locations where XRC files are kept.
XRC files can be found in the following places:
* the directories in sys.path
* <sys.prefix>/share/XRCWidgets/data
"""
for p in sys.path:
yield p
yield os.normpath(os.join(sys.prefix,"share/XRCWidgets/data"))
_getXRCFileLocations = staticmethod(_getXRCFileLocations)
def _loadXRCFile(self,fileNm,parent):
"""Load this object's definitions from an XRC file.
The file at <fileNm> should be an XRC file containing a resource
with the same name as this class. This resource's definition
will be loaded into the current object using two-stage initialisation,
abstracted by the object's '_getPre' and '_loadOn' methods.
<parent> must be the parent of the to-be-created widget.
"""
self._xrcres = xrc.XmlResource(fileNm)
pre = self._getPre()
self._loadOn(self._xrcres,pre,parent,self.__class__.__name__)
self.PostCreate(pre)
## wxPython 2.5 introduces the PostCreate method to wrap a lot
## of ugliness. Check the wx version and implement this method
- ## for earlier version.
+ ## for versions less than 2.5
if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
def PostCreate(self,pre):
self.this = pre.this
self._setOORInfo(self)
-
+
+
+ ## Methods for manipulating child widgets
+
+ def _getChildName(self,cName):
+ """This method allows name-mangling to be inserted, if required."""
+ return cName
+
+
+ def getChild(self,cName):
+ """Lookup and return a child widget by name."""
+ chld = xrc.XRCCTRL(self,self._getChildName(cName))
+ if chld is None:
+ raise XRCWidgetsError("Child '%s' not found" % (cName,))
+
+
+ def createInChild(self,cName,toCreate,*args):
+ """Create a Widget inside the named child.
+ <toCreate> should be a callable returning the widget instance (usually
+ its class) that takes the new widget's parent as first argument. It
+ will be called as:
+
+ toCreate(self.getChild(cName),*args)
+
+ The newly created widget will be displayed as the only content of the
+ named child, expanded inside a sizer. A reference to it will also be
+ returned.
+ """
+ chld = self.getChild(cName)
+ newWidget = toCreate(chld,*args)
+ self.showInWindow(chld,newWidget)
+ return newWidget
+
+
+ def showInChild(self,cName,widget):
+ """Show the given widget inside the named child.
+ The widget is expected to have the child as its parent. It will be
+ shown in an expandable sizer as the child's only content.
+ """
+ self.showInWindow(self.getChild(cName),widget)
+
+
+ def replaceInChild(self,cName,widget):
+ """As with showInChild, but destroys the child's previous contents."""
+ self.replaceInWindow(self.getChild(cName),widget)
+
+
+ def showInWindow(self,window,widget):
+ """Show the given widget inside the given window.
+ The widget is expected to have the window as its parent. It will be
+ shown in an expandable sizer as the windows's only content.
+ Any widgets that are currently children of the window will be hidden,
+ and a list of references to them will be returned.
+ """
+ oldChildren = []
+ sizer = window.GetSizer()
+ if sizer is None:
+ sizer = wx.BoxSizer(wx.HORIZONTAL)
+ else:
+ for c in window.GetChildren():
+ sizer.Remove(c)
+ c.Hide()
+ oldChildren.append(c)
+ sizer.Add(widget,1,wx.EXPAND|wx.ADJUST_MINSIZE)
+ widget.Show()
+ sizer.Layout()
+ window.SetSizer(sizer,False)
+ window.Layout()
+
+ def replaceInWindow(self,window,widget):
+ """As with showInWindow, but destroys the window's previous contents.
+ Does not return a list of references.
+ """
+ oldChildren = self.showInWindow(window,widget)
+ for c in oldChildren:
+ c.Destroy()
########
##
## XRCWidget subclasses for specific Widgets
##
########
class XRCPanel(wx.Panel,XRCWidget):
"""wx.Panel with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Panel.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PrePanel()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnPanel(pre,parent,nm)
class XRCFrame(wx.Frame,XRCWidget):
"""wx.Frame with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Frame.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreFrame()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnFrame(pre,parent,nm)
class XRCDialog(wx.Dialog,XRCWidget):
"""wx.Dialog with XRCWidget behaviors."""
def __init__(self,parent,*args):
wx.Dialog.__init__(self,parent,*args)
XRCWidget.__init__(self,parent)
def _getPre(self):
return wx.PreDialog()
def _loadOn(self,XRCRes,pre,parent,nm):
return XRCRes.LoadOnDialog(pre,parent,nm)
|
rfk/xrcwidgets
|
72b1da3e05ed8146a0467954c32e6f297fe74e09
|
*** empty log message ***
|
diff --git a/XRCWidgets/__init__.py b/XRCWidgets/__init__.py
new file mode 100644
index 0000000..01d191d
--- /dev/null
+++ b/XRCWidgets/__init__.py
@@ -0,0 +1,159 @@
+"""
+
+ XRCWidgets: GUI Toolkit build around wxPython and the XRC file format
+
+
+XRC is a wxWidgets standard for describing a GUI in an XML file. This module
+provides facilities to easily incorporate GUI components ('widgets') whose
+layout is defined in such a file.
+
+"""
+
+import sys
+import os
+
+import wx
+from wx import xrc
+
+
+########
+##
+## Module-Specific Exception Classes
+##
+########
+
+class XRCWidgetsError(Exception):
+ """Base class for XRCWidgets-specific Exceptions."""
+ pass
+
+
+########
+##
+## Base XRCWidget Class
+##
+########
+
+class XRCWidget:
+ """Mix-in Class providing basic XRC behaviors.
+
+ Classes inheriting from this class should also inherit from one of the
+ wxPython GUI classes that can be loaded from an XRC file - for example,
+ wxPanel or wxFrame. This class provides the mechanisms for automatically
+ locating the XRC file and loading the definitions from it.
+ """
+
+
+ def __init__(self,parent):
+ self._xrcfile = self._findXRCFile()
+ self._loadXRCFile(self._xrcfile,parent)
+
+
+ ## Methods for dealing with XRC resource files
+
+ def _findXRCFile(cls):
+ """Locate the XRC file for this class, and return its location.
+ The name of the XRC file is constructed from the name of the class
+ and its defining module. If this class is named <ClassName> and is
+ defined in module <TopLevel>.<SubLevel>.<Package>, then the XRC file
+ searched for will be <TopLevel>/<SubLevel>/<Package>.xrc
+ The locations within the filesystem which are to be searched are
+ obtained from the _getXRCFileLocations() method.
+ """
+ filePath = "/".join(cls.__module__.split(".")) + ".xrc"
+ for fileLoc in cls._getXRCFileLocations():
+ pth = os.path.join(fileLoc,filePath)
+ if os.path.exists(pth):
+ return pth
+ raise XRCWidgetsError("XRC File '%s' could not be found" % (filePath,))
+ _findXRCFile = classmethod(_findXRCFile)
+
+
+ def _getXRCFileLocations():
+ """Iterator over the possible locations where XRC files are kept.
+ XRC files can be found in the following places:
+
+ * the directories in sys.path
+ * <sys.prefix>/share/XRCWidgets/data
+
+ """
+ for p in sys.path:
+ yield p
+ yield os.normpath(os.join(sys.prefix,"share/XRCWidgets/data"))
+ _getXRCFileLocations = staticmethod(_getXRCFileLocations)
+
+
+ def _loadXRCFile(self,fileNm,parent):
+ """Load this object's definitions from an XRC file.
+ The file at <fileNm> should be an XRC file containing a resource
+ with the same name as this class. This resource's definition
+ will be loaded into the current object using two-stage initialisation,
+ abstracted by the object's '_getPre' and '_loadOn' methods.
+ <parent> must be the parent of the to-be-created widget.
+ """
+ self._xrcres = xrc.XmlResource(fileNm)
+ pre = self._getPre()
+ self._loadOn(self._xrcres,pre,parent,self.__class__.__name__)
+ self.PostCreate(pre)
+
+ ## wxPython 2.5 introduces the PostCreate method to wrap a lot
+ ## of ugliness. Check the wx version and implement this method
+ ## for earlier version.
+ if wx.VERSION[0] <= 2 and not wx.VERSION[1] >= 5:
+ def PostCreate(self,pre):
+ self.this = pre.this
+ self._setOORInfo(self)
+
+
+
+
+########
+##
+## XRCWidget subclasses for specific Widgets
+##
+########
+
+
+class XRCPanel(wx.Panel,XRCWidget):
+ """wx.Panel with XRCWidget behaviors."""
+
+ def __init__(self,parent,*args):
+ wx.Panel.__init__(self,parent,*args)
+ XRCWidget.__init__(self,parent)
+
+ def _getPre(self):
+ return wx.PrePanel()
+
+ def _loadOn(self,XRCRes,pre,parent,nm):
+ return XRCRes.LoadOnPanel(pre,parent,nm)
+
+
+
+class XRCFrame(wx.Frame,XRCWidget):
+ """wx.Frame with XRCWidget behaviors."""
+
+ def __init__(self,parent,*args):
+ wx.Frame.__init__(self,parent,*args)
+ XRCWidget.__init__(self,parent)
+
+ def _getPre(self):
+ return wx.PreFrame()
+
+ def _loadOn(self,XRCRes,pre,parent,nm):
+ return XRCRes.LoadOnFrame(pre,parent,nm)
+
+
+
+class XRCDialog(wx.Dialog,XRCWidget):
+ """wx.Dialog with XRCWidget behaviors."""
+
+ def __init__(self,parent,*args):
+ wx.Dialog.__init__(self,parent,*args)
+ XRCWidget.__init__(self,parent)
+
+ def _getPre(self):
+ return wx.PreDialog()
+
+ def _loadOn(self,XRCRes,pre,parent,nm):
+ return XRCRes.LoadOnDialog(pre,parent,nm)
+
+
|
scrumers/CoreCloud
|
ba32cca264b636b12ff954e5b1050e28e770b6b4
|
CloudKit renamed in CoreCloud
|
diff --git a/README.rdoc b/README.rdoc
index 69e94e6..b3ea1fa 100644
--- a/README.rdoc
+++ b/README.rdoc
@@ -1,87 +1,87 @@
== Installation
-CloudKit is compiled as a static library, and the easiest way to add it to your project is to use Xcodeâs âdependent projectâ facilities. Here is how:
+CoreCloud is compiled as a static library, and the easiest way to add it to your project is to use Xcodeâs âdependent projectâ facilities. Here is how:
Clone the repository (and its submodules in lib/ !) and make sure you store it in a permanent place, because Xcode will need to reference the files every time you compile your project.
-* Drag and drop the âCloudKit.xcodeprojâ file under âcloudkit-objc/platform/iPhoneâ onto the root of your Xcode projectâs âGroups and Filesâ sidebar.
-* A dialog will appear â make sure âCopy itemsâ is unchecked and âReference Typeâ is âRelative to Projectâ before clicking âAddâ.
-* Link the CloudKit static library to your project:
-* Doubleclick the âCloudKit.xcodeprojâ item that has just been added to the sidebar
-* Go to the âDetailsâ table and you will see a single item: libCloudKit.a.
-* Check the checkbox on the far right of libCloudKit.a.
-* Add CloudKit as a dependency of your project, so Xcode compiles it whenever you compile your project:
-* Expand the âTargetsâ section of the sidebar and double-click your applicationâs target.
+* Drag and drop the âCoreCloud.xcodeprojâ file under âCoreCloud-objc/platform/iPhoneâ onto the root of your Xcode projectâs âGroups and Filesâ sidebar.
+* A dialog will appear â make sure âCopy itemsâ is uncheCCed and âReference Typeâ is âRelative to Projectâ before clicking âAddâ.
+* Link the CoreCloud static library to your project:
+* Double click the âCoreCloud.xcodeprojâ item that has just been added to the sidebar
+* Go to the âDetailsâ table and you will see a single item: libCoreCloud.a.
+* CheCC the cheCCbox on the far right of libCoreCloud.a.
+* Add CoreCloud as a dependency of your project, so Xcode compiles it whenever you compile your project:
+* Expand the âTargetsâ section of the sidebar and double click your applicationâs target.
* Go to the âGeneralâ tab and you will see a âDirect Dependenciesâ section.
-* Click the â+â button, select âCloudKitâ, and click âAdd Targetâ.
+* click the â+â button, select âCoreCloudâ, and click âAdd Targetâ.
-Tell your project where to find the CloudKit headers:
+Tell your project where to find the CoreCloud headers:
* Open your âProject Settingsâ and go to the âBuildâ tab.
-* Look for âHeader Search Pathsâ and doubleclick it.
-* Add the relative path from your projectâs directory to the âcloudkit-objc/srcâ directory.
+* Look for âHeader Search Pathsâ and double click it.
+* Add the relative path from your projectâs directory to the âCoreCloud-objc/srcâ directory.
While you are in Project Settings, go to âOther Linker Flagsâ under the âLinkerâ section, and add â-ObjCâ and â-all_loadâ to the list of flags.
-Youâre ready to go. Just #import âCloudKit/CloudKit.hâ anywhere you want to use CloudKit classes in your project.
+Youâre ready to go. Just #import âCoreCloud/CoreCloud.hâ anywhere you want to use CoreCloud classes in your project.
== Usage
-CloudKit is based on an engine chain. The order you build your chain is important.
+CoreCloud is based on an engine chain. The order you build your chain is important.
- - (void)setUpCloudKit {
+ - (void)setUpCoreCloud {
//This engine will define the correct URL, according your Routes.plist
- CKRoutesEngine *routesEngine;
+ CCRoutesEngine *routesEngine;
NSURL *routesURL= [[NSBundle mainBundle] URLForResource:@"Routes" withExtension:@"plist"];
- routesEngine= [[CKRoutesEngine alloc] initWithRoutesURL:routesURL];
- [[CKCloudKitManager defaultConfiguration] addEngine:routesEngine withKey:@"RouteEngine"];
+ routesEngine= [[CCRoutesEngine alloc] initWithRoutesURL:routesURL];
+ [[CCManager defaultConfiguration] addEngine:routesEngine withKey:@"RouteEngine"];
[routesEngine release];
//This engine will eventually convert the objects your POSTing into NSDictionary
- CKDictionarizerEngine *dictionarizerEngine;
- dictionarizerEngine= [[CKDictionarizerEngine alloc] initWithLocalPrefix:@"S"];
- [[CKCloudKitManager defaultConfiguration] addEngine:dictionarizerEngine withKey:@"DictionarizerEngine"];
+ CCDictionarizerEngine *dictionarizerEngine;
+ dictionarizerEngine= [[CCDictionarizerEngine alloc] initWithLocalPrefix:@"S"];
+ [[CCManager defaultConfiguration] addEngine:dictionarizerEngine withKey:@"DictionarizerEngine"];
[dictionarizerEngine release];
//This engine will convert the previous dictionary into JSON
- CKJSONEngine *JSONEngine;
- JSONEngine= [[CKJSONEngine alloc] init];
- [[CKCloudKitManager defaultConfiguration] addEngine:JSONEngine withKey:@"JSONEngine"];
+ CCJSONEngine *JSONEngine;
+ JSONEngine= [[CCJSONEngine alloc] init];
+ [[CCManager defaultConfiguration] addEngine:JSONEngine withKey:@"JSONEngine"];
[JSONEngine release];
//This engine will add the authentication elements on the request
- CKHTTPBasicAuthenticationEngine *HTTPBasicEngine;
- HTTPBasicEngine= [[CKHTTPBasicAuthenticationEngine alloc] init];
- [[CKCloudKitManager defaultConfiguration] addEngine:HTTPBasicEngine withKey:@"HTTPBasicEngine"];
+ CCHTTPBasicAuthenticationEngine *HTTPBasicEngine;
+ HTTPBasicEngine= [[CCHTTPBasicAuthenticationEngine alloc] init];
+ [[CCManager defaultConfiguration] addEngine:HTTPBasicEngine withKey:@"HTTPBasicEngine"];
[HTTPBasicEngine release];
}
- (void)applicationDidFinishLaunching:(UIApplication *)application {
- [self setUpCloudKit];
+ [self setUpCoreCloud];
}
Engines are used in the order you declared it for a request, and reversed order for responses. An engine is a simple class implementing the following protocol:
- @protocol CKEngine
+ @protocol CCEngine
@required
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data;
@end
-Once you've configured CloudKit, your interlocutor will be CKCloudKitManager:
+Once you've configured CoreCloud, your interlocutor will be CCManager:
- (void)loadUsers:(id)sender {
NSMutableURLRequest *request;
request= [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"user#index"]];
- [[CKCloudKitManager defaultConfiguration] sendRequest:request withParams:nil andDelegate:self];
+ [[CCManager defaultConfiguration] sendRequest:request withParams:nil andDelegate:self];
}
- (void)request:(NSMutableURLRequest *)request didSucceedWithData:(id)data {
// data usage
}
- (void)request:(NSMutableURLRequest *)request didFailWithError:(NSError *)error {
// error handling
}
That's it, we've just obtained an array of objects from the cloud.
More documentation coming soon.
\ No newline at end of file
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
deleted file mode 100644
index 078a689..0000000
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
+++ /dev/null
@@ -1,707 +0,0 @@
-// !$*UTF8*$!
-{
- 0867D690FE84028FC02AAC07 /* Project object */ = {
- activeBuildConfigurationName = Release;
- activeSDKPreference = iphoneos4.0;
- activeTarget = D2AAC07D0554694100DB518D /* CloudKit */;
- addToTargets = (
- D2AAC07D0554694100DB518D /* CloudKit */,
- );
- breakpoints = (
- );
- codeSenseManager = 43A20CA0116DBEAB00BA930A /* Code sense */;
- perUserDictionary = {
- PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 20,
- 1072,
- 20,
- 48,
- 43,
- 43,
- 20,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXFileDataSource_FiletypeID,
- PBXFileDataSource_Filename_ColumnID,
- PBXFileDataSource_Built_ColumnID,
- PBXFileDataSource_ObjectSize_ColumnID,
- PBXFileDataSource_Errors_ColumnID,
- PBXFileDataSource_Warnings_ColumnID,
- PBXFileDataSource_Target_ColumnID,
- );
- };
- PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
- PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
- PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
- PBXFileTableDataSourceColumnWidthsKey = (
- 20,
- 1032,
- 60,
- 20,
- 48,
- 43,
- 43,
- );
- PBXFileTableDataSourceColumnsKey = (
- PBXFileDataSource_FiletypeID,
- PBXFileDataSource_Filename_ColumnID,
- PBXTargetDataSource_PrimaryAttribute,
- PBXFileDataSource_Built_ColumnID,
- PBXFileDataSource_ObjectSize_ColumnID,
- PBXFileDataSource_Errors_ColumnID,
- PBXFileDataSource_Warnings_ColumnID,
- );
- };
- PBXPerProjectTemplateStateSaveDate = 300957655;
- PBXWorkspaceStateSaveDate = 300957655;
- };
- perUserProjectItems = {
- 4305392211A5366B003C39C8 /* PBXTextBookmark */ = 4305392211A5366B003C39C8 /* PBXTextBookmark */;
- 4305392311A5366B003C39C8 /* PBXTextBookmark */ = 4305392311A5366B003C39C8 /* PBXTextBookmark */;
- 431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6011A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6211A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
- 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */ = 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */;
- 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */ = 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */;
- 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */;
- 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */;
- 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */;
- 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */ = 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */;
- 436F8B4111E463E900D37395 /* PBXTextBookmark */ = 436F8B4111E463E900D37395 /* PBXTextBookmark */;
- 436F8DC011E4818800D37395 /* PBXTextBookmark */ = 436F8DC011E4818800D37395 /* PBXTextBookmark */;
- 436F8DC111E4818800D37395 /* PBXTextBookmark */ = 436F8DC111E4818800D37395 /* PBXTextBookmark */;
- 4377A2C511EB42AB00D1909C /* PBXTextBookmark */ = 4377A2C511EB42AB00D1909C /* PBXTextBookmark */;
- 4377A2F011EB446300D1909C /* PBXTextBookmark */ = 4377A2F011EB446300D1909C /* PBXTextBookmark */;
- 4377A2F111EB446300D1909C /* PBXTextBookmark */ = 4377A2F111EB446300D1909C /* PBXTextBookmark */;
- 4377A2FF11EB47C800D1909C /* PBXTextBookmark */ = 4377A2FF11EB47C800D1909C /* PBXTextBookmark */;
- 4377A3BC11EC677F00D1909C /* PBXTextBookmark */ = 4377A3BC11EC677F00D1909C /* PBXTextBookmark */;
- 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1711A58C1F0028F47F /* PBXTextBookmark */;
- 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9B11A599EE0028F47F /* PBXTextBookmark */;
- 43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
- 43FD6A5411EF3576005EE5A3 /* PBXTextBookmark */ = 43FD6A5411EF3576005EE5A3 /* PBXTextBookmark */;
- 43FD6AF811EF3A87005EE5A3 /* PBXTextBookmark */ = 43FD6AF811EF3A87005EE5A3 /* PBXTextBookmark */;
- 43FD6BA211EF4317005EE5A3 /* PBXTextBookmark */ = 43FD6BA211EF4317005EE5A3 /* PBXTextBookmark */;
- 43FD6C1111F0414D005EE5A3 /* PBXTextBookmark */ = 43FD6C1111F0414D005EE5A3 /* PBXTextBookmark */;
- };
- sourceControlManager = 43A20C9F116DBEAB00BA930A /* Source Control */;
- userBuildSettings = {
- };
- };
- 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
- sepNavSelRange = "{219, 28}";
- sepNavVisRange = "{0, 253}";
- };
- };
- 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
- sepNavSelRange = "{253, 18}";
- sepNavVisRange = "{0, 342}";
- };
- };
- 4305392211A5366B003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */;
- name = "NSMutableArray+CloudKitAdditions.h: 14";
- rLen = 28;
- rLoc = 219;
- rType = 0;
- vrLen = 253;
- vrLoc = 0;
- };
- 4305392311A5366B003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */;
- name = "NSMutableArray+CloudKitAdditions.m: 14";
- rLen = 18;
- rLoc = 253;
- rType = 0;
- vrLen = 342;
- vrLoc = 0;
- };
- 43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {3281, 1053}}";
- sepNavSelRange = "{234, 0}";
- sepNavVisRange = "{0, 439}";
- };
- };
- 4317EFEC1181DB510045FF78 /* CloudKit.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 464}}";
- sepNavSelRange = "{320, 0}";
- sepNavVisRange = "{0, 433}";
- sepNavWindowFrame = "{{15, 315}, {750, 558}}";
- };
- };
- 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
- sepNavSelRange = "{736, 0}";
- sepNavVisRange = "{0, 901}";
- };
- };
- 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
- sepNavSelRange = "{336, 98}";
- sepNavVisRange = "{0, 656}";
- };
- };
- 4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 345}}";
- sepNavSelRange = "{365, 0}";
- sepNavVisRange = "{0, 504}";
- sepNavWindowFrame = "{{38, 294}, {750, 558}}";
- };
- };
- 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 423}}";
- sepNavSelRange = "{133, 0}";
- sepNavVisRange = "{0, 833}";
- };
- };
- 4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
- sepNavSelRange = "{305, 100}";
- sepNavVisRange = "{0, 412}";
- };
- };
- 4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 442}}";
- sepNavSelRange = "{225, 0}";
- sepNavVisRange = "{0, 824}";
- };
- };
- 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
- sepNavSelRange = "{343, 98}";
- sepNavVisRange = "{0, 580}";
- };
- };
- 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1348, 589}}";
- sepNavSelRange = "{246, 0}";
- sepNavVisRange = "{0, 271}";
- };
- };
- 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 494}}";
- sepNavSelRange = "{307, 0}";
- sepNavVisRange = "{140, 646}";
- };
- };
- 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
- sepNavSelRange = "{229, 0}";
- sepNavVisRange = "{0, 851}";
- };
- };
- 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 702}}";
- sepNavSelRange = "{1029, 134}";
- sepNavVisRange = "{296, 988}";
- };
- };
- 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1250, 871}}";
- sepNavSelRange = "{1471, 0}";
- sepNavVisRange = "{756, 1476}";
- sepNavWindowFrame = "{{15, 315}, {750, 558}}";
- };
- };
- 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 520}}";
- sepNavSelRange = "{326, 0}";
- sepNavVisRange = "{0, 634}";
- sepNavWindowFrame = "{{15, 315}, {750, 558}}";
- };
- };
- 4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
- sepNavSelRange = "{508, 0}";
- sepNavVisRange = "{0, 899}";
- };
- };
- 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 1274}}";
- sepNavSelRange = "{1590, 0}";
- sepNavVisRange = "{1108, 1199}";
- };
- };
- 4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 1768}}";
- sepNavSelRange = "{1106, 99}";
- sepNavVisRange = "{733, 1037}";
- };
- };
- 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1348, 637}}";
- sepNavSelRange = "{291, 19}";
- sepNavVisRange = "{0, 1399}";
- };
- };
- 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 883}";
- };
- };
- 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 458}}";
- sepNavSelRange = "{296, 0}";
- sepNavVisRange = "{0, 334}";
- };
- };
- 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 458}}";
- sepNavSelRange = "{240, 103}";
- sepNavVisRange = "{0, 713}";
- };
- };
- 431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */;
- name = "NSData+CloudKitAdditions.h: 12";
- rLen = 11;
- rLoc = 201;
- rType = 0;
- vrLen = 265;
- vrLoc = 0;
- };
- 431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */;
- name = "NSData+CloudKitAdditions.m: 11";
- rLen = 10;
- rLoc = 209;
- rType = 0;
- vrLen = 1393;
- vrLoc = 0;
- };
- 431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */;
- name = "NSKeyValueCoding.h: 127";
- rLen = 30;
- rLoc = 20057;
- rType = 0;
- vrLen = 2509;
- vrLoc = 18489;
- };
- 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- name = NSKeyValueCoding.h;
- path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h;
- sourceTree = "<absolute>";
- };
- 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */;
- name = "CloudKit.h: 16";
- rLen = 0;
- rLoc = 320;
- rType = 0;
- vrLen = 433;
- vrLoc = 0;
- };
- 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */;
- name = "NSDictionary+CloudKitAdditions.m: 14";
- rLen = 103;
- rLoc = 240;
- rType = 0;
- vrLen = 713;
- vrLoc = 0;
- };
- 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */;
- name = "NSURLRequest.h: 521";
- rLen = 36;
- rLoc = 20720;
- rType = 0;
- vrLen = 1375;
- vrLoc = 21387;
- };
- 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- name = NSURLRequest.h;
- path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLRequest.h;
- sourceTree = "<absolute>";
- };
- 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */;
- name = "NSString+InflectionSupport.m: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 883;
- vrLoc = 0;
- };
- 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */;
- name = "NSDictionary+CloudKitAdditions.h: 14";
- rLen = 0;
- rLoc = 296;
- rType = 0;
- vrLen = 334;
- vrLoc = 0;
- };
- 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
- name = "CKHTTPBasicAuthenticationEngine.h: 17";
- rLen = 98;
- rLoc = 336;
- rType = 0;
- vrLen = 656;
- vrLoc = 0;
- };
- 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */;
- name = "CKDictionarizerEngine.h: 19";
- rLen = 133;
- rLoc = 435;
- rType = 0;
- vrLen = 627;
- vrLoc = 0;
- };
- 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
- name = "CKHTTPBasicAuthenticationEngine.m: 41";
- rLen = 134;
- rLoc = 1029;
- rType = 0;
- vrLen = 988;
- vrLoc = 296;
- };
- 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */;
- name = "CKRequestDelegate.h: 17";
- rLen = 0;
- rLoc = 367;
- rType = 0;
- vrLen = 367;
- vrLoc = 0;
- };
- 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
- name = "CKEngine.h: 14";
- rLen = 232;
- rLoc = 180;
- rType = 0;
- vrLen = 418;
- vrLoc = 0;
- };
- 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
- name = "CKRoutesEngine.h: 18";
- rLen = 98;
- rLoc = 343;
- rType = 0;
- vrLen = 580;
- vrLoc = 0;
- };
- 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
- name = "CKRoutesEngine.m: 45";
- rLen = 99;
- rLoc = 1106;
- rType = 0;
- vrLen = 1037;
- vrLoc = 733;
- };
- 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
- name = "CKCloudKitManager.m: 11";
- rLen = 0;
- rLoc = 229;
- rType = 0;
- vrLen = 851;
- vrLoc = 0;
- };
- 4322F71311EB3BEF00A9CEF0 /* FBDialog.h */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- name = FBDialog.h;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBConnect/FBDialog.h";
- sourceTree = "<absolute>";
- };
- 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4322F71311EB3BEF00A9CEF0 /* FBDialog.h */;
- name = "FBDialog.h: 15";
- rLen = 0;
- rLoc = 588;
- rType = 0;
- vrLen = 1006;
- vrLoc = 0;
- };
- 435A08CD1191C14A00030F4C /* CKEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
- sepNavSelRange = "{180, 232}";
- sepNavVisRange = "{0, 418}";
- };
- };
- 436F8B4111E463E900D37395 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */;
- name = "CKRequestManager.m: 25";
- rLen = 0;
- rLoc = 508;
- rType = 0;
- vrLen = 899;
- vrLoc = 0;
- };
- 436F8DC011E4818800D37395 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */;
- name = "CKRequestManager.h: 19";
- rLen = 100;
- rLoc = 305;
- rType = 0;
- vrLen = 412;
- vrLoc = 0;
- };
- 436F8DC111E4818800D37395 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */;
- name = "CKCloudKitManager.h: 26";
- rLen = 0;
- rLoc = 736;
- rType = 0;
- vrLen = 901;
- vrLoc = 0;
- };
- 4377A2C511EB42AB00D1909C /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
- name = "CKOAuthEngine.h: 7";
- rLen = 0;
- rLoc = 133;
- rType = 0;
- vrLen = 833;
- vrLoc = 0;
- };
- 4377A2F011EB446300D1909C /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
- name = "CKOAuthEngine.m: 21";
- rLen = 0;
- rLoc = 326;
- rType = 0;
- vrLen = 634;
- vrLoc = 0;
- };
- 4377A2F111EB446300D1909C /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
- name = "CKRequestOperation.h: 13";
- rLen = 0;
- rLoc = 225;
- rType = 0;
- vrLen = 824;
- vrLoc = 0;
- };
- 4377A2FF11EB47C800D1909C /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
- name = "CKRequestOperation.m: 52";
- rLen = 0;
- rLoc = 1590;
- rType = 0;
- vrLen = 1199;
- vrLoc = 1108;
- };
- 4377A3BC11EC677F00D1909C /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */;
- name = "NSString+InflectionSupport.h: 16";
- rLen = 0;
- rLoc = 307;
- rType = 0;
- vrLen = 646;
- vrLoc = 140;
- };
- 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1251, 629}}";
- sepNavSelRange = "{187, 0}";
- sepNavVisRange = "{0, 188}";
- };
- };
- 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
- sepNavSelRange = "{435, 133}";
- sepNavVisRange = "{0, 627}";
- };
- };
- 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 1976}}";
- sepNavSelRange = "{243, 0}";
- sepNavVisRange = "{0, 680}";
- };
- };
- 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E3A1811A58C1F0028F47F /* FBDialog.m */;
- name = "FBDialog.m: 322";
- rLen = 0;
- rLoc = 11414;
- rType = 0;
- vrLen = 1860;
- vrLoc = 10804;
- };
- 438E3A1811A58C1F0028F47F /* FBDialog.m */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- name = FBDialog.m;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBDialog.m";
- sourceTree = "<absolute>";
- };
- 438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
- sepNavSelRange = "{367, 0}";
- sepNavVisRange = "{0, 367}";
- };
- };
- 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E3A9C11A599EE0028F47F /* FBRequest.h */;
- name = "FBRequest.h: 134";
- rLen = 70;
- rLoc = 3444;
- rType = 0;
- vrLen = 852;
- vrLoc = 3045;
- };
- 438E3A9C11A599EE0028F47F /* FBRequest.h */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- name = FBRequest.h;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/src/FBConnect/FBRequest.h";
- sourceTree = "<absolute>";
- };
- 43A20C9F116DBEAB00BA930A /* Source Control */ = {
- isa = PBXSourceControlManager;
- fallbackIsa = XCSourceControlManager;
- isSCMEnabled = 0;
- scmConfiguration = {
- repositoryNamesForRoots = {
- "" = "";
- };
- };
- };
- 43A20CA0116DBEAB00BA930A /* Code sense */ = {
- isa = PBXCodeSenseManager;
- indexTemplatePath = "";
- };
- 43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 43A20EB6116DD04D00BA930A /* NSString.h */;
- name = "NSString.h: 187";
- rLen = 120;
- rLoc = 9394;
- rType = 0;
- vrLen = 3358;
- vrLoc = 7953;
- };
- 43A20EB6116DD04D00BA930A /* NSString.h */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- name = NSString.h;
- path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h;
- sourceTree = "<absolute>";
- };
- 43FD6A5411EF3576005EE5A3 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
- name = "CKDictionarizerEngine.m: 13";
- rLen = 0;
- rLoc = 243;
- rType = 0;
- vrLen = 680;
- vrLoc = 0;
- };
- 43FD6AF811EF3A87005EE5A3 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
- name = "CKJSONEngine.h: 17";
- rLen = 0;
- rLoc = 365;
- rType = 0;
- vrLen = 504;
- vrLoc = 0;
- };
- 43FD6BA211EF4317005EE5A3 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 44";
- rLen = 0;
- rLoc = 1471;
- rType = 0;
- vrLen = 1459;
- vrLoc = 773;
- };
- 43FD6C1111F0414D005EE5A3 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 44";
- rLen = 0;
- rLoc = 1471;
- rType = 0;
- vrLen = 1476;
- vrLoc = 756;
- };
- D2AAC07D0554694100DB518D /* CloudKit */ = {
- activeExec = 0;
- };
-}
diff --git a/platform/iPhone/CoreCloud.xcodeproj/Ludovic.pbxuser b/platform/iPhone/CoreCloud.xcodeproj/Ludovic.pbxuser
new file mode 100644
index 0000000..b6967cd
--- /dev/null
+++ b/platform/iPhone/CoreCloud.xcodeproj/Ludovic.pbxuser
@@ -0,0 +1,462 @@
+// !$*UTF8*$!
+{
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ activeBuildConfigurationName = Release;
+ activeSDKPreference = iphoneos4.0;
+ activeTarget = D2AAC07D0554694100DB518D /* CoreCloud */;
+ addToTargets = (
+ D2AAC07D0554694100DB518D /* CoreCloud */,
+ );
+ breakpoints = (
+ );
+ codeSenseManager = 43A20CA0116DBEAB00BA930A /* Code sense */;
+ perUserDictionary = {
+ PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 884,
+ 20,
+ 48,
+ 43,
+ 43,
+ 20,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ PBXFileDataSource_Target_ColumnID,
+ );
+ };
+ PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 844,
+ 60,
+ 20,
+ 48,
+ 43,
+ 43,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXTargetDataSource_PrimaryAttribute,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 301050252;
+ PBXWorkspaceStateSaveDate = 301050252;
+ };
+ perUserProjectItems = {
+ 430226AC11F1A94D00606CDB = 430226AC11F1A94D00606CDB /* PBXBookmark */;
+ 430226B111F1A98000606CDB = 430226B111F1A98000606CDB /* PBXTextBookmark */;
+ 4302270811F1AADE00606CDB /* PBXTextBookmark */ = 4302270811F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270911F1AADE00606CDB /* PBXTextBookmark */ = 4302270911F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270A11F1AADE00606CDB /* PBXTextBookmark */ = 4302270A11F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270B11F1AADE00606CDB /* PBXTextBookmark */ = 4302270B11F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270C11F1AADE00606CDB /* PBXTextBookmark */ = 4302270C11F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270D11F1AADE00606CDB /* PBXTextBookmark */ = 4302270D11F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270E11F1AADE00606CDB /* PBXTextBookmark */ = 4302270E11F1AADE00606CDB /* PBXTextBookmark */;
+ 4302270F11F1AADE00606CDB /* PBXTextBookmark */ = 4302270F11F1AADE00606CDB /* PBXTextBookmark */;
+ 4302271311F1ABAD00606CDB /* PBXTextBookmark */ = 4302271311F1ABAD00606CDB /* PBXTextBookmark */;
+ 4302271411F1ABAD00606CDB /* XCBuildMessageTextBookmark */ = 4302271411F1ABAD00606CDB /* XCBuildMessageTextBookmark */;
+ 4302271511F1ABAD00606CDB /* PBXTextBookmark */ = 4302271511F1ABAD00606CDB /* PBXTextBookmark */;
+ 4302271611F1AC4800606CDB /* PBXTextBookmark */ = 4302271611F1AC4800606CDB /* PBXTextBookmark */;
+ 4302272011F1AC6B00606CDB /* PBXTextBookmark */ = 4302272011F1AC6B00606CDB /* PBXTextBookmark */;
+ 4302272111F1AC9F00606CDB /* PBXTextBookmark */ = 4302272111F1AC9F00606CDB /* PBXTextBookmark */;
+ 431C7F6311A4200A004F2B13 = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
+ 4322F49E11EA739B00A9CEF0 = 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */;
+ 4322F53811EA7F5F00A9CEF0 = 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */;
+ 4322F76511EB3E9000A9CEF0 = 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */;
+ 4377A3BC11EC677F00D1909C = 4377A3BC11EC677F00D1909C /* PBXTextBookmark */;
+ 438E3A1711A58C1F0028F47F = 438E3A1711A58C1F0028F47F /* PBXTextBookmark */;
+ 438E3A9B11A599EE0028F47F = 438E3A9B11A599EE0028F47F /* PBXTextBookmark */;
+ 43A20EB5116DD04D00BA930A = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
+ };
+ sourceControlManager = 43A20C9F116DBEAB00BA930A /* Source Control */;
+ userBuildSettings = {
+ };
+ };
+ 430226AC11F1A94D00606CDB /* PBXBookmark */ = {
+ isa = PBXBookmark;
+ fRef = 4378EF791181D6AA004697B8 /* CoreCloud_Prefix.pch */;
+ };
+ 430226B111F1A98000606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4378EF791181D6AA004697B8 /* CoreCloud_Prefix.pch */;
+ name = "CloudKit_Prefix.pch: 7";
+ rLen = 0;
+ rLoc = 187;
+ rType = 0;
+ vrLen = 188;
+ vrLoc = 0;
+ };
+ 430226CD11F1A99D00606CDB /* CoreCloud.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 377}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 433}";
+ };
+ };
+ 430226D011F1A9BA00606CDB /* CCManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 1235}}";
+ sepNavSelRange = "{519, 0}";
+ sepNavVisRange = "{0, 1311}";
+ sepNavWindowFrame = "{{38, 179}, {750, 673}}";
+ };
+ };
+ 430226D211F1A9BA00606CDB /* CCRequestManager.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 572}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 597}";
+ };
+ };
+ 430226D311F1A9BA00606CDB /* CCRequestOperation.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 442}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 729}";
+ };
+ };
+ 430226D411F1A9BA00606CDB /* CCRequestOperation.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 1339}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 718}";
+ };
+ };
+ 430226FB11F1AA8000606CDB /* CCEngine.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 377}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 418}";
+ };
+ };
+ 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1062, 377}}";
+ sepNavSelRange = "{203, 0}";
+ sepNavVisRange = "{0, 367}";
+ };
+ };
+ 4302270811F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226CD11F1A99D00606CDB /* CoreCloud.h */;
+ name = "CoreCloud.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 433;
+ vrLoc = 0;
+ };
+ 4302270911F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D011F1A9BA00606CDB /* CCManager.m */;
+ name = "CCManager.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 647;
+ vrLoc = 0;
+ };
+ 4302270A11F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D211F1A9BA00606CDB /* CCRequestManager.m */;
+ name = "CCRequestManager.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 597;
+ vrLoc = 0;
+ };
+ 4302270B11F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D311F1A9BA00606CDB /* CCRequestOperation.h */;
+ name = "CCRequestOperation.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 729;
+ vrLoc = 0;
+ };
+ 4302270C11F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D411F1A9BA00606CDB /* CCRequestOperation.m */;
+ name = "CCRequestOperation.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 718;
+ vrLoc = 0;
+ };
+ 4302270D11F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226FB11F1AA8000606CDB /* CCEngine.h */;
+ name = "CCEngine.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 418;
+ vrLoc = 0;
+ };
+ 4302270E11F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */;
+ name = "CCRequestDelegate.h: 13";
+ rLen = 0;
+ rLoc = 203;
+ rType = 0;
+ vrLen = 367;
+ vrLoc = 0;
+ };
+ 4302270F11F1AADE00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */;
+ name = "CCRequestDelegate.h: 13";
+ rLen = 0;
+ rLoc = 203;
+ rType = 0;
+ vrLen = 367;
+ vrLoc = 0;
+ };
+ 4302271311F1ABAD00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */;
+ name = "CCRequestDelegate.h: 13";
+ rLen = 0;
+ rLoc = 203;
+ rType = 0;
+ vrLen = 367;
+ vrLoc = 0;
+ };
+ 4302271411F1ABAD00606CDB /* XCBuildMessageTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "CKCloudKitManager.h: No such file or directory";
+ fRef = 430226D011F1A9BA00606CDB /* CCManager.m */;
+ fallbackIsa = XCBuildMessageTextBookmark;
+ rLen = 1;
+ rLoc = 8;
+ rType = 1;
+ };
+ 4302271511F1ABAD00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D011F1A9BA00606CDB /* CCManager.m */;
+ name = "CCManager.m: 9";
+ rLen = 0;
+ rLoc = 141;
+ rType = 0;
+ vrLen = 647;
+ vrLoc = 0;
+ };
+ 4302271611F1AC4800606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D011F1A9BA00606CDB /* CCManager.m */;
+ name = "CCManager.m: 87";
+ rLen = 0;
+ rLoc = 2318;
+ rType = 0;
+ vrLen = 607;
+ vrLoc = 0;
+ };
+ 4302272011F1AC6B00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D011F1A9BA00606CDB /* CCManager.m */;
+ name = "CCManager.m: 87";
+ rLen = 0;
+ rLoc = 2318;
+ rType = 0;
+ vrLen = 607;
+ vrLoc = 0;
+ };
+ 4302272111F1AC9F00606CDB /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 430226D011F1A9BA00606CDB /* CCManager.m */;
+ name = "CCManager.m: 26";
+ rLen = 0;
+ rLoc = 519;
+ rType = 0;
+ vrLen = 1311;
+ vrLoc = 0;
+ };
+ 43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {3281, 1053}}";
+ sepNavSelRange = "{234, 0}";
+ sepNavVisRange = "{0, 439}";
+ };
+ };
+ 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 494}}";
+ sepNavSelRange = "{307, 0}";
+ sepNavVisRange = "{140, 646}";
+ };
+ };
+ 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{0, 883}";
+ };
+ };
+ 431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */;
+ name = "NSKeyValueCoding.h: 127";
+ rLen = 30;
+ rLoc = 20057;
+ rType = 0;
+ vrLen = 2509;
+ vrLoc = 18489;
+ };
+ 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSKeyValueCoding.h;
+ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h;
+ sourceTree = "<absolute>";
+ };
+ 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */;
+ name = "NSURLRequest.h: 521";
+ rLen = 36;
+ rLoc = 20720;
+ rType = 0;
+ vrLen = 1375;
+ vrLoc = 21387;
+ };
+ 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSURLRequest.h;
+ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLRequest.h;
+ sourceTree = "<absolute>";
+ };
+ 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */;
+ name = "NSString+InflectionSupport.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 883;
+ vrLoc = 0;
+ };
+ 4322F71311EB3BEF00A9CEF0 /* FBDialog.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = FBDialog.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBConnect/FBDialog.h";
+ sourceTree = "<absolute>";
+ };
+ 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4322F71311EB3BEF00A9CEF0 /* FBDialog.h */;
+ name = "FBDialog.h: 15";
+ rLen = 0;
+ rLoc = 588;
+ rType = 0;
+ vrLen = 1006;
+ vrLoc = 0;
+ };
+ 4377A3BC11EC677F00D1909C /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */;
+ name = "NSString+InflectionSupport.h: 16";
+ rLen = 0;
+ rLoc = 307;
+ rType = 0;
+ vrLen = 646;
+ vrLoc = 140;
+ };
+ 4378EF791181D6AA004697B8 /* CoreCloud_Prefix.pch */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {845, 545}}";
+ sepNavSelRange = "{188, 0}";
+ sepNavVisRange = "{0, 188}";
+ sepNavWindowFrame = "{{15, 200}, {750, 673}}";
+ };
+ };
+ 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 438E3A1811A58C1F0028F47F /* FBDialog.m */;
+ name = "FBDialog.m: 322";
+ rLen = 0;
+ rLoc = 11414;
+ rType = 0;
+ vrLen = 1860;
+ vrLoc = 10804;
+ };
+ 438E3A1811A58C1F0028F47F /* FBDialog.m */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.objc;
+ name = FBDialog.m;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBDialog.m";
+ sourceTree = "<absolute>";
+ };
+ 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 438E3A9C11A599EE0028F47F /* FBRequest.h */;
+ name = "FBRequest.h: 134";
+ rLen = 70;
+ rLoc = 3444;
+ rType = 0;
+ vrLen = 852;
+ vrLoc = 3045;
+ };
+ 438E3A9C11A599EE0028F47F /* FBRequest.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = FBRequest.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/src/FBConnect/FBRequest.h";
+ sourceTree = "<absolute>";
+ };
+ 43A20C9F116DBEAB00BA930A /* Source Control */ = {
+ isa = PBXSourceControlManager;
+ fallbackIsa = XCSourceControlManager;
+ isSCMEnabled = 0;
+ scmConfiguration = {
+ repositoryNamesForRoots = {
+ "" = "";
+ };
+ };
+ };
+ 43A20CA0116DBEAB00BA930A /* Code sense */ = {
+ isa = PBXCodeSenseManager;
+ indexTemplatePath = "";
+ };
+ 43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 43A20EB6116DD04D00BA930A /* NSString.h */;
+ name = "NSString.h: 187";
+ rLen = 120;
+ rLoc = 9394;
+ rType = 0;
+ vrLen = 3358;
+ vrLoc = 7953;
+ };
+ 43A20EB6116DD04D00BA930A /* NSString.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = NSString.h;
+ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h;
+ sourceTree = "<absolute>";
+ };
+ D2AAC07D0554694100DB518D /* CoreCloud */ = {
+ activeExec = 0;
+ };
+}
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3 b/platform/iPhone/CoreCloud.xcodeproj/Ludovic.perspectivev3
similarity index 90%
rename from platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
rename to platform/iPhone/CoreCloud.xcodeproj/Ludovic.perspectivev3
index 2d8e2d1..80d44b0 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
+++ b/platform/iPhone/CoreCloud.xcodeproj/Ludovic.perspectivev3
@@ -1,1289 +1,1199 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
- <array>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusErrorsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusErrorsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusWarningsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusWarningsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusAnalyzerResultsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusAnalyzerResultsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- </array>
+ <array/>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
- <real>325</real>
+ <real>273</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>43053A2811A55962003C39C8</string>
<string>43A20CF0116DC0DA00BA930A</string>
<string>43A20CF1116DC0DA00BA930A</string>
<string>43A20CE0116DC0DA00BA930A</string>
<string>438E39B611A5831B0028F47F</string>
<string>43A20FD4116DD8F900BA930A</string>
<string>43A20DA1116DC5A400BA930A</string>
<string>43A2108A116DEB3900BA930A</string>
<string>431C7D6E11A402FA004F2B13</string>
<string>43A20DA2116DC5B000BA930A</string>
<string>43A20CE9116DC0DA00BA930A</string>
<string>43A2107F116DEB2000BA930A</string>
<string>43A20FE9116DDC3800BA930A</string>
<string>43A20CE5116DC0DA00BA930A</string>
<string>43A21086116DEB2B00BA930A</string>
<string>43A20D3C116DC1D700BA930A</string>
<string>43A20CE2116DC0DA00BA930A</string>
<string>435A08CC1191C13000030F4C</string>
<string>32C88DFF0371C24200C91783</string>
<string>0867D69AFE84028FC02AAC07</string>
<string>034768DFFF38A50411DB9C8B</string>
<string>1C37FBAC04509CD000000102</string>
+ <string>4302271211F1ABAD00606CDB</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>58</integer>
<integer>57</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 265}, {347, 874}}</string>
+ <string>{{0, 0}, {295, 702}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {364, 892}}</string>
+ <string>{{0, 0}, {312, 720}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
- <real>325</real>
+ <real>273</real>
</array>
<key>RubberWindowFrame</key>
- <string>0 95 1680 933 0 0 1680 1028 </string>
+ <string>0 117 1440 761 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
- <string>364pt</string>
+ <string>312pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CKJSONEngine.m</string>
+ <string>CCManager.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CKJSONEngine.m</string>
+ <string>CCManager.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>43FD6C1111F0414D005EE5A3</string>
+ <string>4302272111F1AC9F00606CDB</string>
<key>history</key>
<array>
<string>43A20EB5116DD04D00BA930A</string>
- <string>431C7F6011A4200A004F2B13</string>
- <string>431C7F6211A4200A004F2B13</string>
<string>431C7F6311A4200A004F2B13</string>
- <string>4305392211A5366B003C39C8</string>
- <string>4305392311A5366B003C39C8</string>
<string>438E3A1711A58C1F0028F47F</string>
<string>438E3A9B11A599EE0028F47F</string>
- <string>436F8B4111E463E900D37395</string>
- <string>436F8DC011E4818800D37395</string>
- <string>436F8DC111E4818800D37395</string>
- <string>4322F40911EA6DE300A9CEF0</string>
- <string>4322F44411EA6EC900A9CEF0</string>
<string>4322F49E11EA739B00A9CEF0</string>
<string>4322F53811EA7F5F00A9CEF0</string>
- <string>4322F53A11EA7F5F00A9CEF0</string>
- <string>4322F5AF11EB004600A9CEF0</string>
- <string>4322F5B011EB004600A9CEF0</string>
- <string>4322F5B111EB004600A9CEF0</string>
- <string>4322F5B311EB004600A9CEF0</string>
- <string>4322F5B411EB004600A9CEF0</string>
- <string>4322F5B711EB004600A9CEF0</string>
- <string>4322F5B811EB004600A9CEF0</string>
- <string>4322F5B911EB004600A9CEF0</string>
<string>4322F76511EB3E9000A9CEF0</string>
- <string>4377A2C511EB42AB00D1909C</string>
- <string>4377A2F011EB446300D1909C</string>
- <string>4377A2F111EB446300D1909C</string>
- <string>4377A2FF11EB47C800D1909C</string>
<string>4377A3BC11EC677F00D1909C</string>
- <string>43FD6A5411EF3576005EE5A3</string>
- <string>43FD6AF811EF3A87005EE5A3</string>
- <string>43FD6BA211EF4317005EE5A3</string>
+ <string>4302270811F1AADE00606CDB</string>
+ <string>4302270A11F1AADE00606CDB</string>
+ <string>4302270B11F1AADE00606CDB</string>
+ <string>4302270C11F1AADE00606CDB</string>
+ <string>4302270D11F1AADE00606CDB</string>
+ <string>4302271311F1ABAD00606CDB</string>
+ <string>4302271411F1ABAD00606CDB</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1311, 518}}</string>
+ <string>{{0, 0}, {1123, 715}}</string>
<key>RubberWindowFrame</key>
- <string>0 95 1680 933 0 0 1680 1028 </string>
+ <string>0 117 1440 761 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>518pt</string>
+ <string>715pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>369pt</string>
+ <string>0pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1311, 342}}</string>
- <key>RubberWindowFrame</key>
- <string>0 95 1680 933 0 0 1680 1028 </string>
+ <string>{{10, 27}, {1123, 279}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1207, 311}}</string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1124, 223}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
- <integer>1024</integer>
+ <integer>1021</integer>
<key>XCBuildResultsTrigger_Open</key>
- <integer>1013</integer>
+ <integer>1011</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1207, 311}}</string>
+ <string>{{10, 27}, {1123, -27}}</string>
+ <key>RubberWindowFrame</key>
+ <string>0 117 1440 761 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
- <string>1311pt</string>
+ <string>1123pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
- <string>43FD6C1211F0414D005EE5A3</string>
+ <string>430226CA11F1A99300606CDB</string>
<string>1CA23ED40692098700951B8B</string>
- <string>43FD6C1311F0414D005EE5A3</string>
+ <string>430226CB11F1A99300606CDB</string>
<string>433104F70F1280740091B39C</string>
- <string>43FD6C1411F0414D005EE5A3</string>
+ <string>430226CC11F1A99300606CDB</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1440, 200}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>200pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {720, 256}}</string>
<string>{{720, 0}, {720, 256}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1440, 256}}</string>
<string>{{0, 256}, {1440, 259}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 205}, {1440, 515}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
<string>{{720, 0}, {720, 256}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>515pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
<string>4377A30511EB47D400D1909C</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
<string>4377A30611EB47D400D1909C</string>
<string>4377A30711EB47D400D1909C</string>
<string>4377A30811EB47D400D1909C</string>
<string>4377A30911EB47D400D1909C</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>300958029.90329301</real>
+ <real>0.0</real>
<key>ToolbarDisplayMode</key>
- <integer>2</integer>
+ <integer>1</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/platform/iPhone/CloudKit.xcodeproj</string>
+ <string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/platform/iPhone/CoreCloud.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>0 95 1680 933 0 0 1680 1028 </string>
+ <string>0 117 1440 761 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.debuggerConsole</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAAC065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {700, 358}}</string>
<key>RubberWindowFrame</key>
<string>149 87 700 400 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Name</key>
<string>Debugger Console</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugCLIModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D5B069F1CE1000CFCEE</string>
<string>1C530D5C069F1CE1000CFCEE</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>149 87 440 400 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D5B069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.scm</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB2065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB3065D492600B07095</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {452, 0}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>0pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052920623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>SCM</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ConsoleFrame</key>
<string>{{0, 259}, {452, 0}}</string>
<key>Frame</key>
<string>{{0, 7}, {452, 259}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
<key>TableConfiguration</key>
<array>
<string>Status</string>
<real>30</real>
<string>FileName</string>
<real>199</real>
<string>Path</string>
<real>197.09500122070312</real>
</array>
<key>TableFrame</key>
<string>{{0, 0}, {452, 250}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Proportion</key>
<string>262pt</string>
</dict>
</array>
<key>Proportion</key>
<string>266pt</string>
</dict>
</array>
<key>Name</key>
<string>SCM</string>
<key>ServiceClasses</key>
<array>
<string>PBXCVSModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAB4065D492600B07095</string>
<string>1C78EAB5065D492600B07095</string>
<string>1C78EAB2065D492600B07095</string>
<string>1CD052920623707200166675</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.scmV3</string>
<key>WindowString</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CE0B1FE06471DED0097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>no</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>168</real>
diff --git a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj b/platform/iPhone/CoreCloud.xcodeproj/project.pbxproj
similarity index 58%
rename from platform/iPhone/CloudKit.xcodeproj/project.pbxproj
rename to platform/iPhone/CoreCloud.xcodeproj/project.pbxproj
index ca03ce0..4b0e9ed 100644
--- a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
+++ b/platform/iPhone/CoreCloud.xcodeproj/project.pbxproj
@@ -1,611 +1,611 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
- 4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */; };
- 4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */; };
- 4317EFED1181DB510045FF78 /* CloudKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */; };
- 4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */; };
- 4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */; };
- 4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */; };
- 4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */; };
- 4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */; };
- 4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */; };
- 4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */; };
- 4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */; };
+ 430226CE11F1A99D00606CDB /* CoreCloud.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226CD11F1A99D00606CDB /* CoreCloud.h */; };
+ 430226D511F1A9BA00606CDB /* CCManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226CF11F1A9BA00606CDB /* CCManager.h */; };
+ 430226D611F1A9BA00606CDB /* CCManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226D011F1A9BA00606CDB /* CCManager.m */; };
+ 430226D711F1A9BA00606CDB /* CCRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226D111F1A9BA00606CDB /* CCRequestManager.h */; };
+ 430226D811F1A9BA00606CDB /* CCRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226D211F1A9BA00606CDB /* CCRequestManager.m */; };
+ 430226D911F1A9BA00606CDB /* CCRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226D311F1A9BA00606CDB /* CCRequestOperation.h */; };
+ 430226DA11F1A9BA00606CDB /* CCRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226D411F1A9BA00606CDB /* CCRequestOperation.m */; };
+ 430226E111F1AA0E00606CDB /* NSData+CoreCloudAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226DB11F1AA0E00606CDB /* NSData+CoreCloudAdditions.h */; };
+ 430226E211F1AA0E00606CDB /* NSData+CoreCloudAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226DC11F1AA0E00606CDB /* NSData+CoreCloudAdditions.m */; };
+ 430226E311F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226DD11F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.h */; };
+ 430226E411F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226DE11F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.m */; };
+ 430226E511F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226DF11F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.h */; };
+ 430226E611F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226E011F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.m */; };
+ 430226E911F1AA2400606CDB /* CCDictionarizerEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226E711F1AA2400606CDB /* CCDictionarizerEngine.h */; };
+ 430226EA11F1AA2400606CDB /* CCDictionarizerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226E811F1AA2400606CDB /* CCDictionarizerEngine.m */; };
+ 430226ED11F1AA3C00606CDB /* CCRoutesEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226EB11F1AA3C00606CDB /* CCRoutesEngine.h */; };
+ 430226EE11F1AA3C00606CDB /* CCRoutesEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226EC11F1AA3C00606CDB /* CCRoutesEngine.m */; };
+ 430226F111F1AA4D00606CDB /* CCJSONEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226EF11F1AA4D00606CDB /* CCJSONEngine.h */; };
+ 430226F211F1AA4D00606CDB /* CCJSONEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226F011F1AA4D00606CDB /* CCJSONEngine.m */; };
+ 430226F511F1AA6900606CDB /* CCOAuthEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226F311F1AA6900606CDB /* CCOAuthEngine.h */; };
+ 430226F611F1AA6900606CDB /* CCOAuthEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226F411F1AA6900606CDB /* CCOAuthEngine.m */; };
+ 430226F911F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226F711F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.h */; };
+ 430226FA11F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 430226F811F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.m */; };
+ 430226FC11F1AA8000606CDB /* CCEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226FB11F1AA8000606CDB /* CCEngine.h */; };
+ 430226FE11F1AA9500606CDB /* CCRequestDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */; };
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */; };
- 4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */; };
- 4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */; };
- 4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */; };
- 4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */; };
- 4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */; };
- 4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */; };
- 4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */; };
- 4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */; };
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */; };
- 431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */; };
- 431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */; };
4322F74311EB3E4F00A9CEF0 /* libTouchJSON.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431C7D7611A402FA004F2B13 /* libTouchJSON.a */; };
- 435A08CE1191C14A00030F4C /* CKEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 435A08CD1191C14A00030F4C /* CKEngine.h */; };
4377A26E11EB3EDE00D1909C /* libOAuthConsumer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */; };
- 4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */; };
- 438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */; };
- 438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */; };
- 438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */; };
+ 4378EF7A1181D6AA004697B8 /* CoreCloud_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 4378EF791181D6AA004697B8 /* CoreCloud_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE61A71B0DE2551300D4F7B9;
remoteInfo = FBPlatform;
};
4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = OAuthConsumer;
};
431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = TouchJSON;
};
4322F73D11EB3E4600A9CEF0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = TouchJSON;
};
4377A26F11EB3EEA00D1909C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = OAuthConsumer;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+CloudKitAdditions.h"; path = "../../src/NSMutableArray+CloudKitAdditions.h"; sourceTree = "<group>"; };
- 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+CloudKitAdditions.m"; path = "../../src/NSMutableArray+CloudKitAdditions.m"; sourceTree = "<group>"; };
+ 430226CD11F1A99D00606CDB /* CoreCloud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CoreCloud.h; path = ../../src/CoreCloud/CoreCloud.h; sourceTree = SOURCE_ROOT; };
+ 430226CF11F1A9BA00606CDB /* CCManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCManager.h; path = ../../src/CCManager.h; sourceTree = SOURCE_ROOT; };
+ 430226D011F1A9BA00606CDB /* CCManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCManager.m; path = ../../src/CCManager.m; sourceTree = SOURCE_ROOT; };
+ 430226D111F1A9BA00606CDB /* CCRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCRequestManager.h; path = ../../src/CCRequestManager.h; sourceTree = SOURCE_ROOT; };
+ 430226D211F1A9BA00606CDB /* CCRequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCRequestManager.m; path = ../../src/CCRequestManager.m; sourceTree = SOURCE_ROOT; };
+ 430226D311F1A9BA00606CDB /* CCRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCRequestOperation.h; path = ../../src/CCRequestOperation.h; sourceTree = SOURCE_ROOT; };
+ 430226D411F1A9BA00606CDB /* CCRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCRequestOperation.m; path = ../../src/CCRequestOperation.m; sourceTree = SOURCE_ROOT; };
+ 430226DB11F1AA0E00606CDB /* NSData+CoreCloudAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+CoreCloudAdditions.h"; path = "../../src/NSData+CoreCloudAdditions.h"; sourceTree = SOURCE_ROOT; };
+ 430226DC11F1AA0E00606CDB /* NSData+CoreCloudAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+CoreCloudAdditions.m"; path = "../../src/NSData+CoreCloudAdditions.m"; sourceTree = SOURCE_ROOT; };
+ 430226DD11F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CoreCloudAdditions.h"; path = "../../src/NSDictionary+CoreCloudAdditions.h"; sourceTree = SOURCE_ROOT; };
+ 430226DE11F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CoreCloudAdditions.m"; path = "../../src/NSDictionary+CoreCloudAdditions.m"; sourceTree = SOURCE_ROOT; };
+ 430226DF11F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+CoreCloudAdditions.h"; path = "../../src/NSMutableArray+CoreCloudAdditions.h"; sourceTree = SOURCE_ROOT; };
+ 430226E011F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+CoreCloudAdditions.m"; path = "../../src/NSMutableArray+CoreCloudAdditions.m"; sourceTree = SOURCE_ROOT; };
+ 430226E711F1AA2400606CDB /* CCDictionarizerEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCDictionarizerEngine.h; path = ../../src/CCDictionarizerEngine.h; sourceTree = SOURCE_ROOT; };
+ 430226E811F1AA2400606CDB /* CCDictionarizerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCDictionarizerEngine.m; path = ../../src/CCDictionarizerEngine.m; sourceTree = SOURCE_ROOT; };
+ 430226EB11F1AA3C00606CDB /* CCRoutesEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCRoutesEngine.h; path = ../../src/CCRoutesEngine.h; sourceTree = SOURCE_ROOT; };
+ 430226EC11F1AA3C00606CDB /* CCRoutesEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCRoutesEngine.m; path = ../../src/CCRoutesEngine.m; sourceTree = SOURCE_ROOT; };
+ 430226EF11F1AA4D00606CDB /* CCJSONEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCJSONEngine.h; path = ../../src/CCJSONEngine.h; sourceTree = SOURCE_ROOT; };
+ 430226F011F1AA4D00606CDB /* CCJSONEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCJSONEngine.m; path = ../../src/CCJSONEngine.m; sourceTree = SOURCE_ROOT; };
+ 430226F311F1AA6900606CDB /* CCOAuthEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCOAuthEngine.h; path = ../../src/CCOAuthEngine.h; sourceTree = SOURCE_ROOT; };
+ 430226F411F1AA6900606CDB /* CCOAuthEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCOAuthEngine.m; path = ../../src/CCOAuthEngine.m; sourceTree = SOURCE_ROOT; };
+ 430226F711F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCHTTPBasicAuthenticationEngine.h; path = ../../src/CCHTTPBasicAuthenticationEngine.h; sourceTree = SOURCE_ROOT; };
+ 430226F811F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CCHTTPBasicAuthenticationEngine.m; path = ../../src/CCHTTPBasicAuthenticationEngine.m; sourceTree = SOURCE_ROOT; };
+ 430226FB11F1AA8000606CDB /* CCEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEngine.h; path = ../../src/CCEngine.h; sourceTree = SOURCE_ROOT; };
+ 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCRequestDelegate.h; path = ../../src/CCRequestDelegate.h; sourceTree = SOURCE_ROOT; };
43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = HTTPStatus.strings; path = ../../src/HTTPStatus.strings; sourceTree = "<group>"; };
- 4317EFEC1181DB510045FF78 /* CloudKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudKit.h; path = ../../src/CloudKit/CloudKit.h; sourceTree = SOURCE_ROOT; };
- 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKCloudKitManager.h; path = ../../src/CKCloudKitManager.h; sourceTree = SOURCE_ROOT; };
- 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKHTTPBasicAuthenticationEngine.h; path = ../../src/CKHTTPBasicAuthenticationEngine.h; sourceTree = SOURCE_ROOT; };
- 4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKJSONEngine.h; path = ../../src/CKJSONEngine.h; sourceTree = SOURCE_ROOT; };
- 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKOAuthEngine.h; path = ../../src/CKOAuthEngine.h; sourceTree = SOURCE_ROOT; };
- 4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestManager.h; path = ../../src/CKRequestManager.h; sourceTree = SOURCE_ROOT; };
- 4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestOperation.h; path = ../../src/CKRequestOperation.h; sourceTree = SOURCE_ROOT; };
- 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRoutesEngine.h; path = ../../src/CKRoutesEngine.h; sourceTree = SOURCE_ROOT; };
- 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+CloudKitAdditions.h"; path = "../../src/NSData+CloudKitAdditions.h"; sourceTree = SOURCE_ROOT; };
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+InflectionSupport.h"; path = "../../src/NSString+InflectionSupport.h"; sourceTree = SOURCE_ROOT; };
- 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKCloudKitManager.m; path = ../../src/CKCloudKitManager.m; sourceTree = SOURCE_ROOT; };
- 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKHTTPBasicAuthenticationEngine.m; path = ../../src/CKHTTPBasicAuthenticationEngine.m; sourceTree = SOURCE_ROOT; };
- 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKJSONEngine.m; path = ../../src/CKJSONEngine.m; sourceTree = SOURCE_ROOT; };
- 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKOAuthEngine.m; path = ../../src/CKOAuthEngine.m; sourceTree = SOURCE_ROOT; };
- 4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestManager.m; path = ../../src/CKRequestManager.m; sourceTree = SOURCE_ROOT; };
- 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestOperation.m; path = ../../src/CKRequestOperation.m; sourceTree = SOURCE_ROOT; };
- 4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRoutesEngine.m; path = ../../src/CKRoutesEngine.m; sourceTree = SOURCE_ROOT; };
- 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+CloudKitAdditions.m"; path = "../../src/NSData+CloudKitAdditions.m"; sourceTree = SOURCE_ROOT; };
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+InflectionSupport.m"; path = "../../src/NSString+InflectionSupport.m"; sourceTree = SOURCE_ROOT; };
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TouchJSON.xcodeproj; path = "../../lib/touchjson-objc/src/TouchJSON.xcodeproj"; sourceTree = SOURCE_ROOT; };
- 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CloudKitAdditions.h"; path = "../../src/NSDictionary+CloudKitAdditions.h"; sourceTree = "<group>"; };
- 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CloudKitAdditions.m"; path = "../../src/NSDictionary+CloudKitAdditions.m"; sourceTree = "<group>"; };
- 435A08CD1191C14A00030F4C /* CKEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKEngine.h; path = ../../src/CKEngine.h; sourceTree = "<group>"; };
- 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloudKit_Prefix.pch; sourceTree = "<group>"; };
- 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKDictionarizerEngine.h; path = ../../src/CKDictionarizerEngine.h; sourceTree = "<group>"; };
- 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKDictionarizerEngine.m; path = ../../src/CKDictionarizerEngine.m; sourceTree = "<group>"; };
- 438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestDelegate.h; path = ../../src/CKRequestDelegate.h; sourceTree = "<group>"; };
+ 4378EF791181D6AA004697B8 /* CoreCloud_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreCloud_Prefix.pch; sourceTree = "<group>"; };
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OAuthConsumer.xcodeproj; path = "../../lib/oauth-objc/platform/iPhone/OAuthConsumer.xcodeproj"; sourceTree = SOURCE_ROOT; };
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FBConnect.xcodeproj; path = "../../lib/fbconnect-objc/platform/iPhone/FBConnect.xcodeproj"; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- D2AAC07E0554694100DB518D /* libCloudKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCloudKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ D2AAC07E0554694100DB518D /* libCoreCloud.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCoreCloud.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
4322F74311EB3E4F00A9CEF0 /* libTouchJSON.a in Frameworks */,
4377A26E11EB3EDE00D1909C /* libOAuthConsumer.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
- D2AAC07E0554694100DB518D /* libCloudKit.a */,
+ D2AAC07E0554694100DB518D /* libCoreCloud.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* CloudKit */ = {
isa = PBXGroup;
children = (
- 4317EFEC1181DB510045FF78 /* CloudKit.h */,
+ 430226CD11F1A99D00606CDB /* CoreCloud.h */,
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
43053A1111A55398003C39C8 /* HTTPStatus.strings */,
);
name = CloudKit;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
43053A2811A55962003C39C8 /* Core */,
43A20CF0116DC0DA00BA930A /* Utils */,
43A20CE0116DC0DA00BA930A /* Engines */,
435A08CC1191C13000030F4C /* Route engines */,
- 438E3A6A11A595740028F47F /* CKRequestDelegate.h */,
+ 430226FD11F1AA9500606CDB /* CCRequestDelegate.h */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
- 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */,
+ 4378EF791181D6AA004697B8 /* CoreCloud_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
43053A2811A55962003C39C8 /* Core */ = {
isa = PBXGroup;
children = (
- 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */,
- 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */,
- 4317EFF41181DB850045FF78 /* CKRequestManager.h */,
- 4317EFFE1181DB850045FF78 /* CKRequestManager.m */,
- 4317EFF51181DB850045FF78 /* CKRequestOperation.h */,
- 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */,
+ 430226CF11F1A9BA00606CDB /* CCManager.h */,
+ 430226D011F1A9BA00606CDB /* CCManager.m */,
+ 430226D111F1A9BA00606CDB /* CCRequestManager.h */,
+ 430226D211F1A9BA00606CDB /* CCRequestManager.m */,
+ 430226D311F1A9BA00606CDB /* CCRequestOperation.h */,
+ 430226D411F1A9BA00606CDB /* CCRequestOperation.m */,
);
name = Core;
sourceTree = "<group>";
};
4317F0E51181E0B80045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0E91181E0B80045FF78 /* libFBPlatform.a */,
);
name = Products;
sourceTree = "<group>";
};
4317F0ED1181E0C70045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */,
);
name = Products;
sourceTree = "<group>";
};
431C7D6F11A402FA004F2B13 /* Products */ = {
isa = PBXGroup;
children = (
431C7D7611A402FA004F2B13 /* libTouchJSON.a */,
);
name = Products;
sourceTree = "<group>";
};
435A08CC1191C13000030F4C /* Route engines */ = {
isa = PBXGroup;
children = (
- 435A08CD1191C14A00030F4C /* CKEngine.h */,
+ 430226FB11F1AA8000606CDB /* CCEngine.h */,
);
name = "Route engines";
sourceTree = "<group>";
};
438E39B611A5831B0028F47F /* Dictionarizer */ = {
isa = PBXGroup;
children = (
- 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */,
- 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */,
+ 430226E711F1AA2400606CDB /* CCDictionarizerEngine.h */,
+ 430226E811F1AA2400606CDB /* CCDictionarizerEngine.m */,
);
name = Dictionarizer;
sourceTree = "<group>";
};
43A20CE0116DC0DA00BA930A /* Engines */ = {
isa = PBXGroup;
children = (
438E39B611A5831B0028F47F /* Dictionarizer */,
43A20FD4116DD8F900BA930A /* Routes */,
43A20DA1116DC5A400BA930A /* JSON */,
43A20DA2116DC5B000BA930A /* XML */,
43A20CE9116DC0DA00BA930A /* FBConnect */,
43A20CE5116DC0DA00BA930A /* OAuth */,
43A20CE2116DC0DA00BA930A /* HTTP Basic */,
);
name = Engines;
sourceTree = "<group>";
};
43A20CE2116DC0DA00BA930A /* HTTP Basic */ = {
isa = PBXGroup;
children = (
- 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */,
- 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */,
+ 430226F711F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.h */,
+ 430226F811F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.m */,
);
name = "HTTP Basic";
sourceTree = "<group>";
};
43A20CE5116DC0DA00BA930A /* OAuth */ = {
isa = PBXGroup;
children = (
- 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */,
- 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */,
+ 430226F311F1AA6900606CDB /* CCOAuthEngine.h */,
+ 430226F411F1AA6900606CDB /* CCOAuthEngine.m */,
43A21086116DEB2B00BA930A /* Library */,
);
name = OAuth;
sourceTree = "<group>";
};
43A20CE9116DC0DA00BA930A /* FBConnect */ = {
isa = PBXGroup;
children = (
43A2107F116DEB2000BA930A /* Library */,
);
name = FBConnect;
sourceTree = "<group>";
};
43A20CF0116DC0DA00BA930A /* Utils */ = {
isa = PBXGroup;
children = (
43A20CF1116DC0DA00BA930A /* Extensions */,
);
name = Utils;
sourceTree = "<group>";
};
43A20CF1116DC0DA00BA930A /* Extensions */ = {
isa = PBXGroup;
children = (
- 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */,
- 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */,
+ 430226DB11F1AA0E00606CDB /* NSData+CoreCloudAdditions.h */,
+ 430226DC11F1AA0E00606CDB /* NSData+CoreCloudAdditions.m */,
+ 430226DD11F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.h */,
+ 430226DE11F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.m */,
+ 430226DF11F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.h */,
+ 430226E011F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.m */,
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */,
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */,
- 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */,
- 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */,
- 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */,
- 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */,
);
name = Extensions;
sourceTree = "<group>";
};
43A20DA1116DC5A400BA930A /* JSON */ = {
isa = PBXGroup;
children = (
- 4317EFF21181DB850045FF78 /* CKJSONEngine.h */,
- 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */,
+ 430226EF11F1AA4D00606CDB /* CCJSONEngine.h */,
+ 430226F011F1AA4D00606CDB /* CCJSONEngine.m */,
43A2108A116DEB3900BA930A /* Library */,
);
name = JSON;
sourceTree = "<group>";
};
43A20DA2116DC5B000BA930A /* XML */ = {
isa = PBXGroup;
children = (
);
name = XML;
sourceTree = "<group>";
};
43A20FD4116DD8F900BA930A /* Routes */ = {
isa = PBXGroup;
children = (
- 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */,
- 4317F0001181DB850045FF78 /* CKRoutesEngine.m */,
+ 430226EB11F1AA3C00606CDB /* CCRoutesEngine.h */,
+ 430226EC11F1AA3C00606CDB /* CCRoutesEngine.m */,
);
name = Routes;
sourceTree = "<group>";
};
43A2107F116DEB2000BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A21086116DEB2B00BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A2108A116DEB3900BA930A /* Library */ = {
isa = PBXGroup;
children = (
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
- 4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */,
- 4317EFED1181DB510045FF78 /* CloudKit.h in Headers */,
- 4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */,
- 4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */,
- 4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */,
- 4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */,
- 4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */,
- 4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */,
- 4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */,
- 4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */,
+ 4378EF7A1181D6AA004697B8 /* CoreCloud_Prefix.pch in Headers */,
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */,
- 435A08CE1191C14A00030F4C /* CKEngine.h in Headers */,
- 431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */,
- 4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */,
- 438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */,
- 438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */,
+ 430226CE11F1A99D00606CDB /* CoreCloud.h in Headers */,
+ 430226D511F1A9BA00606CDB /* CCManager.h in Headers */,
+ 430226D711F1A9BA00606CDB /* CCRequestManager.h in Headers */,
+ 430226D911F1A9BA00606CDB /* CCRequestOperation.h in Headers */,
+ 430226E111F1AA0E00606CDB /* NSData+CoreCloudAdditions.h in Headers */,
+ 430226E311F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.h in Headers */,
+ 430226E511F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.h in Headers */,
+ 430226E911F1AA2400606CDB /* CCDictionarizerEngine.h in Headers */,
+ 430226ED11F1AA3C00606CDB /* CCRoutesEngine.h in Headers */,
+ 430226F111F1AA4D00606CDB /* CCJSONEngine.h in Headers */,
+ 430226F511F1AA6900606CDB /* CCOAuthEngine.h in Headers */,
+ 430226F911F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.h in Headers */,
+ 430226FC11F1AA8000606CDB /* CCEngine.h in Headers */,
+ 430226FE11F1AA9500606CDB /* CCRequestDelegate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
- D2AAC07D0554694100DB518D /* CloudKit */ = {
+ D2AAC07D0554694100DB518D /* CoreCloud */ = {
isa = PBXNativeTarget;
- buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */;
+ buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CoreCloud" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
4322F73E11EB3E4600A9CEF0 /* PBXTargetDependency */,
4377A27011EB3EEA00D1909C /* PBXTargetDependency */,
);
- name = CloudKit;
+ name = CoreCloud;
productName = CloudKit;
- productReference = D2AAC07E0554694100DB518D /* libCloudKit.a */;
+ productReference = D2AAC07E0554694100DB518D /* libCoreCloud.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- ORGANIZATIONNAME = scrumers;
+ ORGANIZATIONNAME = Scrumers;
};
- buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */;
+ buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CoreCloud" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* CloudKit */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 4317F0E51181E0B80045FF78 /* Products */;
ProjectRef = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
},
{
ProductGroup = 4317F0ED1181E0C70045FF78 /* Products */;
ProjectRef = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
},
{
ProductGroup = 431C7D6F11A402FA004F2B13 /* Products */;
ProjectRef = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
},
);
projectRoot = "";
targets = (
- D2AAC07D0554694100DB518D /* CloudKit */,
+ D2AAC07D0554694100DB518D /* CoreCloud */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
4317F0E91181E0B80045FF78 /* libFBPlatform.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libFBPlatform.a;
remoteRef = 4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libOAuthConsumer.a;
remoteRef = 4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431C7D7611A402FA004F2B13 /* libTouchJSON.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libTouchJSON.a;
remoteRef = 431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */,
- 4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */,
- 4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */,
- 4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */,
- 4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */,
- 4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */,
- 4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */,
- 4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */,
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */,
- 431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */,
- 4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */,
- 438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */,
+ 430226D611F1A9BA00606CDB /* CCManager.m in Sources */,
+ 430226D811F1A9BA00606CDB /* CCRequestManager.m in Sources */,
+ 430226DA11F1A9BA00606CDB /* CCRequestOperation.m in Sources */,
+ 430226E211F1AA0E00606CDB /* NSData+CoreCloudAdditions.m in Sources */,
+ 430226E411F1AA0E00606CDB /* NSDictionary+CoreCloudAdditions.m in Sources */,
+ 430226E611F1AA0E00606CDB /* NSMutableArray+CoreCloudAdditions.m in Sources */,
+ 430226EA11F1AA2400606CDB /* CCDictionarizerEngine.m in Sources */,
+ 430226EE11F1AA3C00606CDB /* CCRoutesEngine.m in Sources */,
+ 430226F211F1AA4D00606CDB /* CCJSONEngine.m in Sources */,
+ 430226F611F1AA6900606CDB /* CCOAuthEngine.m in Sources */,
+ 430226FA11F1AA7600606CDB /* CCHTTPBasicAuthenticationEngine.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
4322F73E11EB3E4600A9CEF0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = TouchJSON;
targetProxy = 4322F73D11EB3E4600A9CEF0 /* PBXContainerItemProxy */;
};
4377A27011EB3EEA00D1909C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = OAuthConsumer;
targetProxy = 4377A26F11EB3EEA00D1909C /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = armv6;
COPY_PHASE_STRIP = NO;
- DSTROOT = /tmp/CloudKit.dst;
+ DSTROOT = /tmp/CoreCloud.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
+ GCC_PREFIX_HEADER = CoreCloud_Prefix.pch;
HEADER_SEARCH_PATHS = (
"../../lib/touchjson-objc/src//**",
"../../lib/oauth-objc/src//**",
);
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
- PRODUCT_NAME = CloudKit;
+ PRODUCT_NAME = CoreCloud;
VALID_ARCHS = armv6;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = armv6;
- DSTROOT = /tmp/CloudKit.dst;
+ DSTROOT = /tmp/CoreCloud.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
+ GCC_PREFIX_HEADER = CoreCloud_Prefix.pch;
HEADER_SEARCH_PATHS = (
"../../lib/touchjson-objc/src//**",
"../../lib/oauth-objc/src//**",
);
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
- PRODUCT_NAME = CloudKit;
+ PRODUCT_NAME = CoreCloud;
VALID_ARCHS = armv6;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "";
OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */ = {
+ 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CoreCloud" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
- 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */ = {
+ 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CoreCloud" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
diff --git a/platform/iPhone/CloudKit_Prefix.pch b/platform/iPhone/CoreCloud_Prefix.pch
similarity index 100%
rename from platform/iPhone/CloudKit_Prefix.pch
rename to platform/iPhone/CoreCloud_Prefix.pch
diff --git a/src/CKDictionarizerEngine.h b/src/CCDictionarizerEngine.h
similarity index 80%
rename from src/CKDictionarizerEngine.h
rename to src/CCDictionarizerEngine.h
index 9f3446b..37fb0b0 100644
--- a/src/CKDictionarizerEngine.h
+++ b/src/CCDictionarizerEngine.h
@@ -1,23 +1,23 @@
//
-// CKDictionarizerEngine.h
-// CloudKit
+// CCDictionarizerEngine.h
+// CoreCloud
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-#import "CKEngine.h"
+#import "CCEngine.h"
-@interface CKDictionarizerEngine : NSObject <CKEngine> {
+@interface CCDictionarizerEngine : NSObject <CCEngine> {
NSString *_localPrefix;
}
- (id)initWithLocalPrefix:(NSString *)localPrefix;
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@property(nonatomic, retain) NSString *localPrefix;
@end
diff --git a/src/CKDictionarizerEngine.m b/src/CCDictionarizerEngine.m
similarity index 96%
rename from src/CKDictionarizerEngine.m
rename to src/CCDictionarizerEngine.m
index 5e429a3..44bdd86 100644
--- a/src/CKDictionarizerEngine.m
+++ b/src/CCDictionarizerEngine.m
@@ -1,143 +1,143 @@
//
-// CKDictionarizerEngine.m
-// CloudKit
+// CCDictionarizerEngine.m
+// CoreCloud
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
-#import "CKDictionarizerEngine.h"
+#import "CCDictionarizerEngine.h"
#import "objc/runtime.h"
#import "NSString+InflectionSupport.h"
-@interface CKDictionarizerEngine (Private)
+@interface CCDictionarizerEngine (Private)
- (NSString *)localClassnameFor:(NSString *)classname;
- (NSString *)remoteClassnameFor:(NSString *)classname;
- (id)objectFromDictionary:(NSDictionary *)dictionary;
- (NSArray *)objectsFromDictionaries:(NSArray *)array;
- (NSDictionary *)dictionaryFromObject:(id)object;
- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects;
@end
-@implementation CKDictionarizerEngine
+@implementation CCDictionarizerEngine
@synthesize
localPrefix= _localPrefix;
- (id)initWithLocalPrefix:(NSString *)localPrefix {
self = [super init];
if (self != nil) {
self.localPrefix= localPrefix;
}
return self;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
id rawBody= [*params valueForKey:@"HTTPBody"];
if (rawBody != nil) {
NSDictionary *processedBody;
if ([rawBody isKindOfClass:[NSArray class]]) {
processedBody= [self dictionaryFromObjects:rawBody];
} else {
processedBody= [self dictionaryFromObject:rawBody];
}
[*params setValue:processedBody forKey:@"HTTPBody"];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error; {
if (*data != nil) {
if ([*data isKindOfClass:[NSArray class]]) {
*data= [self objectsFromDictionaries:*data];
} else {
*data= [self objectFromDictionary:*data];
}
}
}
- (id)objectFromDictionary:(NSDictionary *)dictionary {
id remoteObject, localObject;
NSString *remoteClassname, *localClassname;
remoteClassname= [[dictionary allKeys] lastObject];
remoteObject= [dictionary valueForKey:remoteClassname];
localClassname= [self localClassnameFor:remoteClassname];
localObject= [[NSClassFromString(localClassname) alloc] init];
for (id remoteAttribute in [remoteObject allKeys]) {
NSString *localAttribute= [[NSString stringWithFormat:@"set_%@:", remoteAttribute] camelize];
if ([localObject respondsToSelector:NSSelectorFromString(localAttribute)]) {
[localObject performSelector:NSSelectorFromString(localAttribute)
withObject:[remoteObject valueForKey:remoteAttribute]];
}
}
return localObject;
}
- (NSArray *)objectsFromDictionaries:(NSArray *)array {
NSMutableArray *objects= [NSMutableArray array];
for (id object in array) {
[objects addObject:[self objectFromDictionary:object]];
}
return objects;
}
- (NSDictionary *)dictionaryFromObject:(id)object {
NSMutableDictionary *dict= nil;
if ([object respondsToSelector:@selector(toDictionary)]) {
dict= [object performSelector:@selector(toDictionary)];
} else {
dict = [NSMutableDictionary dictionary];
unsigned int outCount;
objc_property_t *propList = class_copyPropertyList([object class], &outCount);
NSString *propertyName;
for (int i = 0; i < outCount; i++) {
objc_property_t * prop = propList + i;
propertyName = [NSString stringWithCString:property_getName(*prop) encoding:NSUTF8StringEncoding];
if ([object respondsToSelector:NSSelectorFromString(propertyName)]) {
//NSString *type = [NSString stringWithCString:property_getAttributes(*prop) encoding:NSUTF8StringEncoding];
[dict setValue:[object performSelector:NSSelectorFromString(propertyName)] forKey:[propertyName underscore]];
}
}
free(propList);
}
return [NSDictionary dictionaryWithObject:dict
forKey:[self remoteClassnameFor:NSStringFromClass([object class])]];
}
- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects {
return nil;
}
- (NSString *)localClassnameFor:(NSString *)classname {
NSString *result = [classname camelize];
result = [result stringByReplacingCharactersInRange:NSMakeRange(0,1)
withString:[[result substringWithRange:NSMakeRange(0,1)] uppercaseString]];
if (self.localPrefix!=nil) {
result = [self.localPrefix stringByAppendingString:result];
}
return result;
}
- (NSString *)remoteClassnameFor:(NSString *)classname {
NSString *result= classname;
if (self.localPrefix!=nil) {
result= [result substringFromIndex:[self.localPrefix length]];
}
result = [result lowercaseString];
return result;
}
- (void) dealloc {
[_localPrefix release];
[super dealloc];
}
@end
diff --git a/src/CKEngine.h b/src/CCEngine.h
similarity index 88%
rename from src/CKEngine.h
rename to src/CCEngine.h
index bd80219..44afb68 100644
--- a/src/CKEngine.h
+++ b/src/CCEngine.h
@@ -1,18 +1,18 @@
//
-// CKEngine.h
-// CloudKit
+// CCEngine.h
+// CoreCloud
//
// Created by Ludovic Galabru on 05/05/10.
// Copyright 2010 r. All rights reserved.
//
#import <UIKit/UIKit.h>
-@protocol CKEngine
+@protocol CCEngine
@required
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKHTTPBasicAuthenticationEngine.h b/src/CCHTTPBasicAuthenticationEngine.h
similarity index 87%
rename from src/CKHTTPBasicAuthenticationEngine.h
rename to src/CCHTTPBasicAuthenticationEngine.h
index 56d8e3b..081c670 100644
--- a/src/CKHTTPBasicAuthenticationEngine.h
+++ b/src/CCHTTPBasicAuthenticationEngine.h
@@ -1,22 +1,22 @@
//
// SHTTPBasicAuthenticationEngine.h
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-#import "CKEngine.h"
+#import "CCEngine.h"
-@interface CKHTTPBasicAuthenticationEngine : NSObject<CKEngine> {
+@interface CCHTTPBasicAuthenticationEngine : NSObject<CCEngine> {
NSString *_username, *_password, *_basic_authorization;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@property(nonatomic, retain) NSString *username, *password, *basic_authorization;
@end
diff --git a/src/CKHTTPBasicAuthenticationEngine.m b/src/CCHTTPBasicAuthenticationEngine.m
similarity index 85%
rename from src/CKHTTPBasicAuthenticationEngine.m
rename to src/CCHTTPBasicAuthenticationEngine.m
index 0d00739..d3af1f9 100644
--- a/src/CKHTTPBasicAuthenticationEngine.m
+++ b/src/CCHTTPBasicAuthenticationEngine.m
@@ -1,53 +1,53 @@
//
// SHTTPBasicAuthenticationEngine.m
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
-#import "CKHTTPBasicAuthenticationEngine.h"
+#import "CCHTTPBasicAuthenticationEngine.h"
-#import "NSData+CloudKitAdditions.h"
+#import "NSData+CoreCloudAdditions.h"
-@interface CKHTTPBasicAuthenticationEngine (Private)
+@interface CCHTTPBasicAuthenticationEngine (Private)
@end
-@implementation CKHTTPBasicAuthenticationEngine
+@implementation CCHTTPBasicAuthenticationEngine
@synthesize
username= _username,
password= _password,
basic_authorization= _basic_authorization;
- (id)init {
self = [super init];
if (self != nil) {
}
return self;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
if (self.basic_authorization == nil) {
NSData *encodedCredentials;
encodedCredentials= [[NSString stringWithFormat:@"%@:%@", self.username, self.password] dataUsingEncoding:NSASCIIStringEncoding];
self.basic_authorization= [NSString stringWithFormat:@"Basic %@", [NSData base64stringforData:encodedCredentials]];
}
[*request addValue:self.basic_authorization forHTTPHeaderField:@"Authorization"];
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (void) dealloc {
[_username release];
[_password release];
[_basic_authorization release];
[super dealloc];
}
@end
diff --git a/src/CKJSONEngine.h b/src/CCJSONEngine.h
similarity index 79%
rename from src/CKJSONEngine.h
rename to src/CCJSONEngine.h
index 2393454..c99c749 100644
--- a/src/CKJSONEngine.h
+++ b/src/CCJSONEngine.h
@@ -1,19 +1,19 @@
//
-// CKJSONEngine.h
-// CloudKit
+// CCJSONEngine.h
+// CoreCloud
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import <Foundation/Foundation.h>
-#import "CKEngine.h"
+#import "CCEngine.h"
-@interface CKJSONEngine : NSObject <CKEngine> {
+@interface CCJSONEngine : NSObject <CCEngine> {
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKJSONEngine.m b/src/CCJSONEngine.m
similarity index 94%
rename from src/CKJSONEngine.m
rename to src/CCJSONEngine.m
index 58b2efc..3ead9b9 100644
--- a/src/CKJSONEngine.m
+++ b/src/CCJSONEngine.m
@@ -1,66 +1,66 @@
//
-// CKJSONEngine.m
-// CloudKit
+// CCJSONEngine.m
+// CoreCloud
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
-#import "CKJSONEngine.h"
+#import "CCJSONEngine.h"
#import "TouchJSON/TouchJSON.h"
-@interface CKJSONEngine (Private)
+@interface CCJSONEngine (Private)
- (NSString *)serializeObject:(id)inObject;
- (NSString *)serializeArray:(NSArray *)inArray;
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary;
- (id)deserialize:(NSData *)inData error:(NSError **)outError;
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError;
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError;
@end
-@implementation CKJSONEngine
+@implementation CCJSONEngine
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
NSString *path;
path= [[[*request URL] absoluteString] stringByAppendingString:@".json"];
[*request setURL:[NSURL URLWithString:path]];
[*request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
if ([*params valueForKey:@"HTTPBody"] != nil) {
[*request setHTTPBody:(NSData *)[[self serializeDictionary:[*params valueForKey:@"HTTPBody"]] dataUsingEncoding:NSUTF8StringEncoding]];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
*data= [self deserialize:*data error:error];
}
- (NSString *)serializeObject:(id)inObject {
return (NSString *)[[CJSONSerializer serializer] serializeObject:inObject];
}
- (NSString *)serializeArray:(NSArray *)inArray {
return (NSString *)[[CJSONSerializer serializer] serializeArray:inArray];
}
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary {
return (NSString *)[[CJSONSerializer serializer] serializeDictionary:inDictionary];
}
- (id)deserialize:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserialize:inData error:outError];
}
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsDictionary:inData error:outError];
}
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsArray:inData error:outError];
}
@end
diff --git a/src/CKCloudKitManager.h b/src/CCManager.h
similarity index 72%
rename from src/CKCloudKitManager.h
rename to src/CCManager.h
index 4ae38b2..2eff1ea 100644
--- a/src/CKCloudKitManager.h
+++ b/src/CCManager.h
@@ -1,31 +1,31 @@
//
-// CKCloudKitManager.h
+// CCManager.h
// Scrumers
//
// Created by Ludovic Galabru on 25/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-@protocol CKEngine;
+@protocol CCEngine;
-@interface CKCloudKitManager : NSObject {
+@interface CCManager : NSObject {
NSMutableArray *ordered_engines;
NSMutableDictionary *engines;
NSMutableDictionary *droppedEngines;
}
-+ (CKCloudKitManager *)defaultConfiguration;
-- (void)addEngine:(NSObject<CKEngine> *)engine withKey:(NSString *)key;
-- (NSObject<CKEngine> *)engineForKey:(NSString *)key;
++ (CCManager *)defaultConfiguration;
+- (void)addEngine:(NSObject<CCEngine> *)engine withKey:(NSString *)key;
+- (NSObject<CCEngine> *)engineForKey:(NSString *)key;
- (void)dropEngineWithKey:(NSString *)key;
- (void)restaureDroppedEngines;
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params andDelegate:(id)delegate;
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params;
- (void)sendRequest:(NSMutableURLRequest *)request;
@property(readonly) NSMutableArray *ordered_engines;
@end
diff --git a/src/CKCloudKitManager.m b/src/CCManager.m
similarity index 73%
rename from src/CKCloudKitManager.m
rename to src/CCManager.m
index 2987f6d..0953cb9 100644
--- a/src/CKCloudKitManager.m
+++ b/src/CCManager.m
@@ -1,86 +1,86 @@
//
-// CKCloudKitManager.m
+// CCManager.m
// Scrumers
//
// Created by Ludovic Galabru on 25/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
-#import "CKCloudKitManager.h"
-#import "CKRequestManager.h"
-#import "CKRequestOperation.h"
-#import "CKEngine.h"
+#import "CCManager.h"
+#import "CCRequestManager.h"
+#import "CCRequestOperation.h"
+#import "CCEngine.h"
-@implementation CKCloudKitManager
+@implementation CCManager
@synthesize ordered_engines;
- (id)init {
self = [super init];
if (self != nil) {
ordered_engines= [[NSMutableArray alloc] init];
engines= [[NSMutableDictionary alloc] init];
droppedEngines= [[NSMutableDictionary alloc] init];
}
return self;
}
-+ (CKCloudKitManager *)defaultConfiguration {
- static CKCloudKitManager * defaultConfiguration = nil;
++ (CCManager *)defaultConfiguration {
+ static CCManager * defaultConfiguration = nil;
if (defaultConfiguration == nil) {
- defaultConfiguration = [[CKCloudKitManager alloc] init];
+ defaultConfiguration = [[CCManager alloc] init];
}
return defaultConfiguration;
}
-- (void)addEngine:(NSObject<CKEngine> *)engine withKey:(NSString *)key {
+- (void)addEngine:(NSObject<CCEngine> *)engine withKey:(NSString *)key {
[ordered_engines addObject:key];
[engines setObject:engine forKey:key];
}
- (void)dropEngineWithKey:(NSString *)key {
int index= [ordered_engines indexOfObject:key];
[ordered_engines removeObject:key];
[droppedEngines setValue:[NSNumber numberWithInt:index] forKey:key];
}
- (void)restaureDroppedEngines {
for (id key in [droppedEngines allKeys]) {
[ordered_engines insertObject:key atIndex:[[droppedEngines valueForKey:key] intValue]];
}
}
-- (NSObject<CKEngine> *)engineForKey:(NSString *)key {
+- (NSObject<CCEngine> *)engineForKey:(NSString *)key {
return [engines objectForKey:key];
}
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params andDelegate:(id)delegate {
- CKRequestOperation *requestOperation;
- requestOperation= [CKRequestOperation operationWithRequest:request
+ CCRequestOperation *requestOperation;
+ requestOperation= [CCRequestOperation operationWithRequest:request
params:params
delegate:delegate
andConfiguration:self];
- [[CKRequestManager sharedManager] processRequestOperation:requestOperation];
+ [[CCRequestManager sharedManager] processRequestOperation:requestOperation];
}
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params {
[self sendRequest:request withParams:params andDelegate:nil];
}
- (void)sendRequest:(NSMutableURLRequest *)request withDelegate:(id)delegate {
[self sendRequest:request withParams:nil andDelegate:delegate];
}
- (void)sendRequest:(NSMutableURLRequest *)request {
[self sendRequest:request withParams:nil andDelegate:nil];
}
- (void)dealloc {
[engines release];
[ordered_engines release];
[droppedEngines release];
[super dealloc];
}
@end
diff --git a/src/CKOAuthEngine.h b/src/CCOAuthEngine.h
similarity index 91%
rename from src/CKOAuthEngine.h
rename to src/CCOAuthEngine.h
index 9421211..ec3af3e 100644
--- a/src/CKOAuthEngine.h
+++ b/src/CCOAuthEngine.h
@@ -1,31 +1,31 @@
//
// SOAuthEngine.h
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-#import "CKEngine.h"
+#import "CCEngine.h"
@class OAToken;
@class OAConsumer;
@protocol OASignatureProviding;
-@interface CKOAuthEngine : NSObject<CKEngine> {
+@interface CCOAuthEngine : NSObject<CCEngine> {
OAToken * _token;
OAConsumer * _consumer;
id <OASignatureProviding, NSObject> _signatureProvider;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@property(nonatomic, retain) OAToken * token;
@property(nonatomic, retain) OAConsumer * consumer;
@property(nonatomic, retain) id <OASignatureProviding, NSObject> signatureProvider;
@end
diff --git a/src/CKOAuthEngine.m b/src/CCOAuthEngine.m
similarity index 87%
rename from src/CKOAuthEngine.m
rename to src/CCOAuthEngine.m
index d94141e..91963bb 100644
--- a/src/CKOAuthEngine.m
+++ b/src/CCOAuthEngine.m
@@ -1,39 +1,39 @@
//
-// CKOAuthEngine.m
-// CloudKit
+// CCOAuthEngine.m
+// CoreCloud
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
-#import "CKOAuthEngine.h"
+#import "CCOAuthEngine.h"
#import "OAuthConsumer/OAuthConsumer.h"
-@implementation CKOAuthEngine
+@implementation CCOAuthEngine
@synthesize
token = _token;
@synthesize
consumer = _consumer;
@synthesize
signatureProvider = _signatureProvider;
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (void) dealloc {
[_token release];
[_consumer release];
[_signatureProvider release];
[super dealloc];
}
@end
diff --git a/src/CKRequestDelegate.h b/src/CCRequestDelegate.h
similarity index 78%
rename from src/CKRequestDelegate.h
rename to src/CCRequestDelegate.h
index d01e3ca..529f742 100644
--- a/src/CKRequestDelegate.h
+++ b/src/CCRequestDelegate.h
@@ -1,17 +1,17 @@
//
-// CKRequestResponderDelegate.h
-// CloudKit
+// CCRequestResponderDelegate.h
+// CoreCloud
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import <UIKit/UIKit.h>
-@protocol CKRequestDelegate
+@protocol CCRequestDelegate
- (void)request:(NSMutableURLRequest *)request didFailWithError:(NSError *)error;
- (void)request:(NSMutableURLRequest *)request didSucceedWithData:(id)data;
@end
\ No newline at end of file
diff --git a/src/CKRequestManager.h b/src/CCRequestManager.h
similarity index 62%
rename from src/CKRequestManager.h
rename to src/CCRequestManager.h
index 946d135..a63fb02 100644
--- a/src/CKRequestManager.h
+++ b/src/CCRequestManager.h
@@ -1,22 +1,22 @@
//
-// CKRequestManager.h
+// CCRequestManager.h
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-@class CKRequestOperation;
+@class CCRequestOperation;
-@interface CKRequestManager : NSObject {
+@interface CCRequestManager : NSObject {
NSOperationQueue * operationQueue;
}
+ (id)sharedManager;
-- (void)processRequestOperation:(CKRequestOperation *)operation;
+- (void)processRequestOperation:(CCRequestOperation *)operation;
- (void)cancelAllRequestOperations;
@end
diff --git a/src/CKRequestManager.m b/src/CCRequestManager.m
similarity index 68%
rename from src/CKRequestManager.m
rename to src/CCRequestManager.m
index 14f4ea6..c75bda5 100644
--- a/src/CKRequestManager.m
+++ b/src/CCRequestManager.m
@@ -1,46 +1,46 @@
//
-// CKRequestManager.m
+// CCRequestManager.m
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
-#import "CKRequestManager.h"
-#import "CKRequestOperation.h"
+#import "CCRequestManager.h"
+#import "CCRequestOperation.h"
-@implementation CKRequestManager
+@implementation CCRequestManager
- (id)init {
self = [super init];
if (self != nil) {
operationQueue = [[NSOperationQueue alloc] init];
[operationQueue setMaxConcurrentOperationCount:1];
}
return self;
}
+ (id)sharedManager {
- static CKRequestManager * defaultManager = nil;
+ static CCRequestManager * defaultManager = nil;
if (defaultManager == nil) {
- defaultManager = [[CKRequestManager alloc] init];
+ defaultManager = [[CCRequestManager alloc] init];
}
return defaultManager;
}
-- (void)processRequestOperation:(CKRequestOperation *)operation {
+- (void)processRequestOperation:(CCRequestOperation *)operation {
[operationQueue addOperation:operation];
}
- (void)cancelAllRequestOperations {
[operationQueue cancelAllOperations];
}
- (void)dealloc {
[operationQueue cancelAllOperations];
[operationQueue release];
[super dealloc];
}
@end
diff --git a/src/CKRequestOperation.h b/src/CCRequestOperation.h
similarity index 61%
rename from src/CKRequestOperation.h
rename to src/CCRequestOperation.h
index 2a40f9f..38d863d 100644
--- a/src/CKRequestOperation.h
+++ b/src/CCRequestOperation.h
@@ -1,33 +1,33 @@
//
-// CKRequestOperation.h
+// CCRequestOperation.h
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-@class CKCloudKitManager;
+@class CCManager;
-@protocol CKRequestDelegate;
+@protocol CCRequestDelegate;
-@interface CKRequestOperation : NSOperation {
+@interface CCRequestOperation : NSOperation {
NSMutableURLRequest * request;
- NSObject<CKRequestDelegate> * delegate;
- CKCloudKitManager *configuration;
+ NSObject<CCRequestDelegate> * delegate;
+ CCManager *configuration;
NSMutableDictionary *params;
NSData * data;
}
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
- andConfiguration:(CKCloudKitManager *)inConfiguration;
+ andConfiguration:(CCManager *)inConfiguration;
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
- andConfiguration:(CKCloudKitManager *)inConfiguration;
+ andConfiguration:(CCManager *)inConfiguration;
@end
diff --git a/src/CKRequestOperation.m b/src/CCRequestOperation.m
similarity index 81%
rename from src/CKRequestOperation.m
rename to src/CCRequestOperation.m
index 1dba152..aa3f18b 100644
--- a/src/CKRequestOperation.m
+++ b/src/CCRequestOperation.m
@@ -1,97 +1,97 @@
//
-// CKRequestOperation.m
+// CCRequestOperation.m
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
-#import "CKRequestOperation.h"
-#import "CKCloudKitManager.h"
-#import "CKRequestDelegate.h"
-#import "CKEngine.h"
+#import "CCRequestOperation.h"
+#import "CCManager.h"
+#import "CCRequestDelegate.h"
+#import "CCEngine.h"
-@implementation CKRequestOperation
+@implementation CCRequestOperation
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
- andConfiguration:(CKCloudKitManager *)inConfiguration {
+ andConfiguration:(CCManager *)inConfiguration {
self = [super init];
if (self != nil) {
request = [inRequest retain];
delegate = [inDelegate retain];
configuration= [inConfiguration retain];
params= [[NSMutableDictionary alloc] initWithDictionary:inParams];
}
return self;
}
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
- andConfiguration:(CKCloudKitManager *)inConfiguration {
- CKRequestOperation *operation;
- operation = [[CKRequestOperation alloc] initWithRequest:inRequest
+ andConfiguration:(CCManager *)inConfiguration {
+ CCRequestOperation *operation;
+ operation = [[CCRequestOperation alloc] initWithRequest:inRequest
params:inParams
delegate:inDelegate
andConfiguration:inConfiguration];
return [operation autorelease];
}
- (void)main {
NSError *error = nil;
NSArray *ordered_engines= [configuration ordered_engines];
for (id engine_name in ordered_engines) {
- id<CKEngine> engine= [configuration engineForKey:engine_name];
+ id<CCEngine> engine= [configuration engineForKey:engine_name];
[engine processRequest:&request withParams:¶ms];
}
NSLog(@"%@", [request URL]);
NSLog(@"%@", [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]);
NSHTTPURLResponse * response;
id rawData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
if (response.statusCode < 400 && error == nil) {
for (int index= [ordered_engines count]-1; index >= 0; index--) {
- id<CKEngine> engine= [configuration engineForKey:[ordered_engines objectAtIndex:index]];
+ id<CCEngine> engine= [configuration engineForKey:[ordered_engines objectAtIndex:index]];
[engine processResponse:&response
withParams:params
data:&rawData
andError:&error];
}
} else if (response.statusCode > 400) {
//errors handling
}
if (error == nil) {
[self performSelectorOnMainThread:@selector(requestDidSucceedWithData:)
withObject:rawData
waitUntilDone:YES];
} else {
[self performSelectorOnMainThread:@selector(requestDidFailWithError:)
withObject:error
waitUntilDone:YES];
}
}
- (void)requestDidFailWithError:(NSError *)error {
[delegate request:request didFailWithError:error];
}
- (void)requestDidSucceedWithData:(id)response {
[delegate request:request didSucceedWithData:response];
}
- (void)dealloc {
[data release];
[request release];
[delegate release];
[super dealloc];
}
@end
diff --git a/src/CKRoutesEngine.h b/src/CCRoutesEngine.h
similarity index 81%
rename from src/CKRoutesEngine.h
rename to src/CCRoutesEngine.h
index a7cb34b..dedcde3 100644
--- a/src/CKRoutesEngine.h
+++ b/src/CCRoutesEngine.h
@@ -1,21 +1,21 @@
//
-// CKRoutesEngine.h
-// CloudKit
+// CCRoutesEngine.h
+// CoreCloud
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import <Foundation/Foundation.h>
-#import "CKEngine.h"
+#import "CCEngine.h"
-@interface CKRoutesEngine : NSObject<CKEngine> {
+@interface CCRoutesEngine : NSObject<CCEngine> {
NSDictionary *routes, *constants;
}
- (id)initWithRoutesURL:(NSURL *)URL;
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKRoutesEngine.m b/src/CCRoutesEngine.m
similarity index 94%
rename from src/CKRoutesEngine.m
rename to src/CCRoutesEngine.m
index c60906d..c4e0b51 100644
--- a/src/CKRoutesEngine.m
+++ b/src/CCRoutesEngine.m
@@ -1,123 +1,123 @@
//
-// CKRoutesEngine.m
-// CloudKit
+// CCRoutesEngine.m
+// CoreCloud
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
-#import "CKRoutesEngine.h"
-#import "NSDictionary+CloudKitAdditions.h"
-#import "NSMutableArray+CloudKitAdditions.h"
+#import "CCRoutesEngine.h"
+#import "NSDictionary+CoreCloudAdditions.h"
+#import "NSMutableArray+CoreCloudAdditions.h"
-@interface CKRoutesEngine (Private)
+@interface CCRoutesEngine (Private)
- (NSURL *)URLForKey:(NSString *)key;
- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
- (NSString *)HTTPMethodForKey:(NSString *)key;
- (NSMutableURLRequest *)requestForKey:(NSString *)key;
- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
@end
-@implementation CKRoutesEngine
+@implementation CCRoutesEngine
- (id)init {
self = [super init];
if (self != nil) {
}
return self;
}
- (id)initWithRoutesURL:(NSURL *)URL {
self = [self init];
if (self != nil) {
NSDictionary* plist;
plist= [NSDictionary dictionaryWithContentsOfURL:URL];
routes= [[NSDictionary alloc] initWithDictionary:[plist valueForKey:@"routes"]];
constants= [[NSDictionary alloc] initWithDictionary:[plist valueForKey:@"constants"]];
}
return self;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
NSString *keyURL= [[*request URL] absoluteString];
NSURL *processedURL= [self URLForKey:keyURL withDictionary:*params];
[*request setURL:processedURL];
NSString *method= [self HTTPMethodForKey:keyURL];
if (method != nil) {
[*request setHTTPMethod:method];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (NSURL *)URLForKey:(NSString *)key {
return [self URLForKey:key withDictionary:nil];
}
- (NSString *)HTTPMethodForKey:(NSString *)key {
NSString *method;
method= [[routes valueForKey:key] valueForKey:@"method"];
return method;
}
- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants {
NSString *rawPath, *processedPath;
NSDictionary *temporaryConstants;
NSURL *processedURL;
temporaryConstants= [NSDictionary dictionaryWithDictionary:constants
andDictionary:newConstants];
rawPath= [[routes valueForKey:key] valueForKey:@"url"];
NSMutableArray *rawComponents= [NSMutableArray arrayWithArray:[rawPath componentsSeparatedByString:@"/"]];
[rawComponents removeEmptyStrings];
NSMutableArray *processedComponents= [NSMutableArray array];
for (id rawComponent in rawComponents) {
NSArray *rawSubComponents= [rawComponent componentsSeparatedByString:@"."];
NSMutableArray *processedSubComponents= [NSMutableArray array];
for (id rawSubComponent in rawSubComponents) {
if (![rawSubComponent isEqualToString:@""]) {
if ([rawSubComponent characterAtIndex:0] == ':') {
NSString *processedSubComponent= [temporaryConstants valueForKey:[rawSubComponent substringFromIndex:1]];
if (processedSubComponent != nil) {
[processedSubComponents addObject:processedSubComponent];
}
} else {
[processedSubComponents addObject:rawSubComponent];
}
}
}
[processedComponents removeEmptyStrings];
[processedComponents addObject:[processedSubComponents componentsJoinedByString:@"."]];
}
processedPath= [processedComponents componentsJoinedByString:@"/"];
processedURL= [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", processedPath]];
return processedURL;
}
- (NSMutableURLRequest *)requestForKey:(NSString *)key {
return [self requestForKey:key withDictionary:nil];
}
- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants {
NSMutableURLRequest *request;
request= [[NSMutableURLRequest alloc] initWithURL:[self URLForKey:key
withDictionary:newConstants]];
NSString *method;
method= [self HTTPMethodForKey:key];
if (method != nil) {
[request setHTTPMethod:method];
}
return request;
}
- (void) dealloc {
[super dealloc];
}
@end
diff --git a/src/CloudKit/CloudKit.h b/src/CloudKit/CloudKit.h
deleted file mode 100644
index 31a5e67..0000000
--- a/src/CloudKit/CloudKit.h
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// CloudKit.h
-// CloudKit
-//
-// Created by Ludovic Galabru on 27/07/09.
-// Copyright 2009 Scrumers. All rights reserved.
-//
-
-
-#import "CKCloudKitManager.h"
-#import "CKRequestManager.h"
-#import "CKRequestOperation.h"
-
-#import "CKHTTPBasicAuthenticationEngine.h"
-//#import "CKOAuthEngine.h"
-#import "CKJSONEngine.h"
-#import "CKRoutesEngine.h"
-#import "CKDictionarizerEngine.h"
-
-#import "CKEngine.h"
-#import "CKRequestDelegate.h"
\ No newline at end of file
diff --git a/src/CoreCloud/CoreCloud.h b/src/CoreCloud/CoreCloud.h
new file mode 100644
index 0000000..a3fb030
--- /dev/null
+++ b/src/CoreCloud/CoreCloud.h
@@ -0,0 +1,21 @@
+//
+// CoreCloud.h
+// CoreCloud
+//
+// Created by Ludovic Galabru on 27/07/09.
+// Copyright 2009 Scrumers. All rights reserved.
+//
+
+
+#import "CCManager.h"
+#import "CCRequestManager.h"
+#import "CCRequestOperation.h"
+
+#import "CCHTTPBasicAuthenticationEngine.h"
+//#import "CCOAuthEngine.h"
+#import "CCJSONEngine.h"
+#import "CCRoutesEngine.h"
+#import "CCDictionarizerEngine.h"
+
+#import "CCEngine.h"
+#import "CCRequestDelegate.h"
\ No newline at end of file
diff --git a/src/HTTPStatus.strings b/src/HTTPStatus.strings
index 4e32bfc..f07dd13 100644
--- a/src/HTTPStatus.strings
+++ b/src/HTTPStatus.strings
@@ -1,76 +1,76 @@
/*
HTTPStatus.strings
- CloudKit
+ CoreCloud
Created by Ludovic Galabru on 5/20/10.
Copyright 2010 scrumers. All rights reserved.
*/
// 1xx Informational
"100"= "Continue";
"101"= "Switching Protocols";
"102"= "Processing (WebDAV)";
// 2xx Success
// This class of status codes indicates the action requested by the client was received, understood, accepted and processed successfully.
"200"= "OK";
"201"= "Created";
"202"= "Accepted";
"203"= "The server successfully processed the request, but is returning information that may be from another source.";
"204"= "The server successfully processed the request, but is not returning any content.";
"205"= "The server successfully processed the request, but is not returning any content.";
"206"= "The server is delivering only part of the resource due to a range header sent by the client";
"207"= "The message body that follows is an XML message and can contain a number of separate response codes";
// 3xx Redirection
// This class of status code indicates that further action needs to be taken by the user agent in order to fulfil the request. The action required may be carried out by the user agent without interaction with the user if and only if the method used in the second request is GET or HEAD. A user agent should not automatically redirect a request more than five times, since such redirections usually indicate an infinite loop.
"300"= "Multiple Choices";
"301"= "Moved Permanently";
"302"= "Found";
"304"= "The resource has not been modified since last requested.";
"305"= "Use Proxy";
"307"= "Temporary Redirect";
// 4xx Client Error
// The 4xx class of status code is intended for cases in which the client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. These status codes are applicable to any request method. User agents should display any included entity to the user. These are typically the most common error codes encountered while online.
"400"= "The request contains bad syntax or cannot be fulfilled.";
"401"= "Unauthorized";
"402"= "Payment Required";
"403"= "The request was a legal request, but the server is refusing to respond to it.";
"404"= "The requested resource could not be found but may be available again in the future.";
"405"= "A request was made of a resource using a request method not supported by that resource.";
"406"= "The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.";
"407"= "Proxy Authentication Required";
"408"= "The server timed out waiting for the request.";
"409"= "The request could not be processed because of conflict in the request";
"410"= "Indicates that the resource requested is no longer available and will not be available again";
"411"= "The request did not specify the length of its content, which is required by the requested resource.";
"412"= "The server does not meet one of the preconditions that the requester put on the request.";
"413"= "The request is larger than the server is willing or able to process.";
"414"= "The URI provided was too long for the server to process.";
"415"= "The request entity has a media type which the server or resource does not support.";
"416"= "The client has asked for a portion of the file, but the server cannot supply that portion.";
"417"= "The server cannot meet the requirements of the Expect request-header field.";
"418"= "The HTCPCP server is a teapot.";
"421"= "There are too many connections from your internet address";
"422"= "The request was well-formed but was unable to be followed due to semantic errors.";
"423"= "The resource that is being accessed is locked";
"424"= "The request failed due to failure of a previous request";
"425"= "Unordered Collection";
"426"= "The client should switch to a different protocol such as TLS/1.0.";
"449"= "The request should be retried after doing the appropriate action.";
// 5xx Server Error
// The server failed to fulfill an apparently valid request.[2]
"500"= "Internal Server Error";
"501"= "The server either does not recognise the request method, or it lacks the ability to fulfill the request.";
"502"= "The server was acting as a gateway or proxy and received an invalid response from the upstream server.";
"503"= "The server is currently unavailable (because it is overloaded or down for maintenance).";
"504"= "The server was acting as a gateway or proxy and did not receive a timely request from the upstream server.";
"505"= "The server does not support the HTTP protocol version used in the request.";
"506"= "Transparent content negotiation for the request, results in a circular reference.";
"507"= "Insufficient Storage";
"509"= "Bandwidth Limit Exceeded";
"510"= "Not Extended";
"530"= "User access denied";
diff --git a/src/NSData+CloudKitAdditions.h b/src/NSData+CoreCloudAdditions.h
similarity index 83%
rename from src/NSData+CloudKitAdditions.h
rename to src/NSData+CoreCloudAdditions.h
index fa3d13f..41ec892 100644
--- a/src/NSData+CloudKitAdditions.h
+++ b/src/NSData+CoreCloudAdditions.h
@@ -1,16 +1,16 @@
//
// NSData+ScrumersAdditions.h
-// CloudKit
+// CoreCloud
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-@interface NSData (CloudKit)
+@interface NSData (CoreCloud)
+ (NSString*)base64stringforData:(NSData*)theData;
@end
diff --git a/src/NSData+CloudKitAdditions.m b/src/NSData+CoreCloudAdditions.m
similarity index 93%
rename from src/NSData+CloudKitAdditions.m
rename to src/NSData+CoreCloudAdditions.m
index b358e8d..d807d48 100644
--- a/src/NSData+CloudKitAdditions.m
+++ b/src/NSData+CoreCloudAdditions.m
@@ -1,48 +1,48 @@
//
// NSData+ScrumersAdditions.m
-// CloudKit
+// CoreCloud
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
-#import "NSData+CloudKitAdditions.h"
+#import "NSData+CoreCloudAdditions.h"
-@implementation NSData (CloudKit)
+@implementation NSData (CoreCloud)
// From: http://www.cocoadev.com/index.pl?BaseSixtyFour
+ (NSString*)base64stringforData:(NSData*)theData {
const uint8_t* input = (const uint8_t*)[theData bytes];
NSInteger length = [theData length];
static char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
NSMutableData* data = [NSMutableData dataWithLength:((length + 2) / 3) * 4];
uint8_t* output = (uint8_t*)data.mutableBytes;
NSInteger i;
for (i=0; i < length; i += 3) {
NSInteger value = 0;
NSInteger j;
for (j = i; j < (i + 3); j++) {
value <<= 8;
if (j < length) {
value |= (0xFF & input[j]);
}
}
NSInteger theIndex = (i / 3) * 4;
output[theIndex + 0] = table[(value >> 18) & 0x3F];
output[theIndex + 1] = table[(value >> 12) & 0x3F];
output[theIndex + 2] = (i + 1) < length ? table[(value >> 6) & 0x3F] : '=';
output[theIndex + 3] = (i + 2) < length ? table[(value >> 0) & 0x3F] : '=';
}
return [[[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding] autorelease];
}
@end
diff --git a/src/NSDictionary+CloudKitAdditions.h b/src/NSDictionary+CoreCloudAdditions.h
similarity index 73%
rename from src/NSDictionary+CloudKitAdditions.h
rename to src/NSDictionary+CoreCloudAdditions.h
index f368a8c..05c562e 100644
--- a/src/NSDictionary+CloudKitAdditions.h
+++ b/src/NSDictionary+CoreCloudAdditions.h
@@ -1,16 +1,16 @@
//
-// NSDictionary+CloudKitAdditions.h
-// CloudKit
+// NSDictionary+CoreCloudAdditions.h
+// CoreCloud
//
// Created by Ludovic Galabru on 19/05/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
-@interface NSDictionary (CloudKit)
+@interface NSDictionary (CoreCloud)
+ (NSDictionary *)dictionaryWithDictionary:(NSDictionary *)dict1 andDictionary:(NSDictionary *)dict2;
@end
diff --git a/src/NSDictionary+CloudKitAdditions.m b/src/NSDictionary+CoreCloudAdditions.m
similarity index 80%
rename from src/NSDictionary+CloudKitAdditions.m
rename to src/NSDictionary+CoreCloudAdditions.m
index 800dc59..e748588 100644
--- a/src/NSDictionary+CloudKitAdditions.m
+++ b/src/NSDictionary+CoreCloudAdditions.m
@@ -1,29 +1,29 @@
//
-// NSDictionary+CloudKitAdditions.m
-// CloudKit
+// NSDictionary+CoreCloudAdditions.m
+// CoreCloud
//
// Created by Ludovic Galabru on 19/05/10.
// Copyright 2010 scrumers. All rights reserved.
//
-#import "NSDictionary+CloudKitAdditions.h"
+#import "NSDictionary+CoreCloudAdditions.h"
-@implementation NSDictionary (CloudKit)
+@implementation NSDictionary (CoreCloud)
+ (NSDictionary *)dictionaryWithDictionary:(NSDictionary *)dict1 andDictionary:(NSDictionary *)dict2 {
NSMutableDictionary *mergedDict;
mergedDict= [NSMutableDictionary dictionaryWithDictionary:dict1];
for (id key in [dict2 allKeys]) {
id value;
if ([dict2 valueForKey:key] == nil || [dict2 valueForKey:key] == [NSNull null]) {
value= @"";
} else {
value= [dict2 valueForKey:key];
}
[mergedDict setValue:value forKey:key];
}
return mergedDict;
}
@end
diff --git a/src/NSMutableArray+CloudKitAdditions.h b/src/NSMutableArray+CoreCloudAdditions.h
similarity index 64%
rename from src/NSMutableArray+CloudKitAdditions.h
rename to src/NSMutableArray+CoreCloudAdditions.h
index 3ac9731..92e7013 100644
--- a/src/NSMutableArray+CloudKitAdditions.h
+++ b/src/NSMutableArray+CoreCloudAdditions.h
@@ -1,16 +1,16 @@
//
-// NSMutableArray+CloudKitAdditions.h
-// CloudKit
+// NSMutableArray+CoreCloudAdditions.h
+// CoreCloud
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import <UIKit/UIKit.h>
-@interface NSMutableArray (CloudKit)
+@interface NSMutableArray (CoreCloud)
- (void)removeEmptyStrings;
@end
diff --git a/src/NSMutableArray+CloudKitAdditions.m b/src/NSMutableArray+CoreCloudAdditions.m
similarity index 58%
rename from src/NSMutableArray+CloudKitAdditions.m
rename to src/NSMutableArray+CoreCloudAdditions.m
index d726aa0..567dcf6 100644
--- a/src/NSMutableArray+CloudKitAdditions.m
+++ b/src/NSMutableArray+CoreCloudAdditions.m
@@ -1,18 +1,18 @@
//
-// NSMutableArray+CloudKitAdditions.m
-// CloudKit
+// NSMutableArray+CoreCloudAdditions.m
+// CoreCloud
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
-#import "NSMutableArray+CloudKitAdditions.h"
+#import "NSMutableArray+CoreCloudAdditions.h"
-@implementation NSMutableArray (CloudKit)
+@implementation NSMutableArray (CoreCloud)
- (void)removeEmptyStrings {
[self removeObjectsInArray:[NSArray arrayWithObject:@""]];
}
@end
|
scrumers/CoreCloud
|
ac53121a5a5f9e1c546a44b9b9915772dc4afb9d
|
Various bugs fixed
|
diff --git a/lib/YAJL-objc/bin/libYAJLIPhone.a b/lib/YAJL-objc/bin/libYAJLIPhone.a
deleted file mode 100644
index c0dc478..0000000
Binary files a/lib/YAJL-objc/bin/libYAJLIPhone.a and /dev/null differ
diff --git a/lib/YAJL-objc/src/NSObject+YAJL.h b/lib/YAJL-objc/src/NSObject+YAJL.h
deleted file mode 100644
index 9e29136..0000000
--- a/lib/YAJL-objc/src/NSObject+YAJL.h
+++ /dev/null
@@ -1,118 +0,0 @@
-//
-// NSObject+YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLGen.h"
-#import "YAJLParser.h"
-
-@interface NSObject (YAJL)
-
-#pragma mark Gen
-
-/*!
- Create JSON string from object.
- Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull
- To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h
- Otherwise throws YAJLGenInvalidObjectException.
- @result JSON String
- */
-- (NSString *)yajl_JSONString;
-
-/*!
- Create JSON string from object.
- Supported objects include: NSArray, NSDictionary, NSNumber, NSString, NSNull
- To override JSON value to encode (or support custom objects), implement (id)JSON; See YAJLCoding in YAJLGen.h
- Otherwise throws YAJLGenInvalidObjectException.
- @param options
- @param indentString
- @result JSON String
- */
-- (NSString *)yajl_JSONStringWithOptions:(YAJLGenOptions)options indentString:(NSString *)indentString;
-
-
-#pragma mark Parsing
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:).
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]}";
- id JSONValue = [JSONString yajl_JSON];
-
- NSData *JSONData = ...;
- id JSONValue = [JSONData yajl_JSON];
- @endcode
- */
-- (id)yajl_JSON;
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:) with out error.
-
- If an error occurs, the returned object will be the current state of the object when
- the error occurred.
-
- @param error Error to set if we failed to parse
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]}";
- NSError *error = nil;
- [JSONString yajl_JSON:error];
- if (error) ...;
- @endcode
- */
-- (id)yajl_JSON:(NSError **)error;
-
-/*!
- Parse JSON (NSString or NSData or dataUsingEncoding:) with options and out error.
-
- If an error occurs, the returned object will be the current state of the object when
- the error occurred.
-
- @param options Options (see YAJLParserOptions)
- @param error Error to set if we failed to parse
- @result JSON object
- @throws YAJLParserException If a parse error occured
- @throws YAJLParsingUnsupportedException If not NSData or doesn't respond to dataUsingEncoding:
-
- @code
- NSString *JSONString = @"{'foo':['bar', true]} // comment";
- NSError *error = nil;
- [JSONString yajl_JSONWithOptions:YAJLParserOptionsAllowComments error:error];
- if (error) ...;
- @endcode
- */
-- (id)yajl_JSONWithOptions:(YAJLParserOptions)options error:(NSError **)error;
-
-@end
-
diff --git a/lib/YAJL-objc/src/YAJL.h b/lib/YAJL-objc/src/YAJL.h
deleted file mode 100644
index 42a7bfa..0000000
--- a/lib/YAJL-objc/src/YAJL.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// YAJL.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/23/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#import "YAJLParser.h"
-#import "YAJLDocument.h"
-#import "YAJLGen.h"
-#import "NSObject+YAJL.h"
diff --git a/lib/YAJL-objc/src/YAJLDocument.h b/lib/YAJL-objc/src/YAJLDocument.h
deleted file mode 100644
index ad15b44..0000000
--- a/lib/YAJL-objc/src/YAJLDocument.h
+++ /dev/null
@@ -1,97 +0,0 @@
-//
-// YAJLDecoder.h
-// YAJL
-//
-// Created by Gabriel Handford on 3/1/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#include "YAJLParser.h"
-
-typedef enum {
- YAJLDecoderCurrentTypeNone,
- YAJLDecoderCurrentTypeArray,
- YAJLDecoderCurrentTypeDict
-} YAJLDecoderCurrentType;
-
-extern NSInteger YAJLDocumentStackCapacity;
-
-@class YAJLDocument;
-
-@protocol YAJLDocumentDelegate <NSObject>
-@optional
-- (void)document:(YAJLDocument *)document didAddDictionary:(NSDictionary *)dict;
-- (void)document:(YAJLDocument *)document didAddArray:(NSArray *)array;
-- (void)document:(YAJLDocument *)document didAddObject:(id)object toArray:(NSArray *)array;
-- (void)document:(YAJLDocument *)document didSetObject:(id)object forKey:(id)key inDictionary:(NSDictionary *)dict;
-@end
-
-@interface YAJLDocument : NSObject <YAJLParserDelegate> {
-
- id root_; // NSArray or NSDictionary
- YAJLParser *parser_;
-
- __weak id<YAJLDocumentDelegate> delegate_;
-
- __weak NSMutableDictionary *dict_; // weak; if map in progress, points to the current map
- __weak NSMutableArray *array_; // weak; If array in progress, points the current array
- __weak NSString *key_; // weak; If map in progress, points to current key
-
- NSMutableArray *stack_;
- NSMutableArray *keyStack_;
-
- YAJLDecoderCurrentType currentType_;
-
- YAJLParserStatus parserStatus_;
-
-}
-
-@property (readonly, nonatomic) id root; //! Root element
-@property (readonly, nonatomic) YAJLParserStatus parserStatus;
-@property (assign, nonatomic) id<YAJLDocumentDelegate> delegate;
-
-/*!
- Create document from data.
- @param data Data to parse
- @param parserOptions Parse options
- @param error Error to set on failure
- */
-- (id)initWithData:(NSData *)data parserOptions:(YAJLParserOptions)parserOptions error:(NSError **)error;
-
-/*!
- Create empty document with parser options.
- @param parserOptions Parse options
- */
-- (id)initWithParserOptions:(YAJLParserOptions)parserOptions;
-
-/*!
- Parse data.
- @param data Data to parse
- @param error Error to set on failure
- @result Parser status
- */
-- (YAJLParserStatus)parse:(NSData *)data error:(NSError **)error;
-
-@end
diff --git a/lib/YAJL-objc/src/YAJLGen.h b/lib/YAJL-objc/src/YAJLGen.h
deleted file mode 100644
index 3b6a948..0000000
--- a/lib/YAJL-objc/src/YAJLGen.h
+++ /dev/null
@@ -1,104 +0,0 @@
-//
-// YAJLGen.h
-// YAJL
-//
-// Created by Gabriel Handford on 7/19/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#include "yajl_gen.h"
-
-extern NSString *const YAJLGenInvalidObjectException;
-
-/*!
- @enum Generate options
- @constant YAJLGenOptionsBeautify
- */
-enum {
- YAJLGenOptionsNone = 0,
- YAJLGenOptionsBeautify = 1 << 0,
- YAJLGenOptionsIgnoreUnknownTypes = 1 << 1, // Ignore unknown types (will use null value)
- YAJLGenOptionsIncludeUnsupportedTypes = 1 << 2, // Handle non-JSON types (including NSDate, NSData, NSURL)
-};
-typedef NSUInteger YAJLGenOptions;
-
-/*!
- YAJL JSON string generator.
- Supports the following types:
- - NSArray
- - NSDictionary
- - NSString
- - NSNumber
- - NSNull
-
- We also support the following types (if using YAJLGenOptionsIncludeUnsupportedTypes option),
- by converting to JSON supported types:
- - NSDate -> number representing number of milliseconds since (1970) epoch
- - NSData -> Base64 encoded string
- - NSURL -> URL (absolute) string
- */
-@interface YAJLGen : NSObject {
- yajl_gen gen_;
-
- YAJLGenOptions genOptions_;
-}
-
-- (id)initWithGenOptions:(YAJLGenOptions)genOptions indentString:(NSString *)indentString;
-
-- (void)object:(id)obj;
-
-- (void)null;
-
-- (void)bool:(BOOL)b;
-
-- (void)number:(NSNumber *)number;
-
-- (void)string:(NSString *)s;
-
-- (void)startDictionary;
-- (void)endDictionary;
-
-- (void)startArray;
-
-- (void)endArray;
-
-- (void)clear;
-
-- (NSString *)buffer;
-
-@end
-
-
-/*!
- Custom objects can support manual JSON encoding.
- */
-@protocol YAJLCoding <NSObject>
-
-/*!
- Provide custom and/or encodable object to parse to JSON string.
- @result Object encodable as JSON such as NSDictionary, NSArray, etc
- */
-- (id)JSON;
-
-@end
diff --git a/lib/YAJL-objc/src/YAJLParser.h b/lib/YAJL-objc/src/YAJLParser.h
deleted file mode 100644
index e76d5b6..0000000
--- a/lib/YAJL-objc/src/YAJLParser.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// YAJLParser.h
-// YAJL
-//
-// Created by Gabriel Handford on 6/14/09.
-// Copyright 2009. All rights reserved.
-//
-// Permission is hereby granted, free of charge, to any person
-// obtaining a copy of this software and associated documentation
-// files (the "Software"), to deal in the Software without
-// restriction, including without limitation the rights to use,
-// copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the
-// Software is furnished to do so, subject to the following
-// conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-// OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-#include "yajl_parse.h"
-
-
-extern NSString *const YAJLErrorDomain;
-extern NSString *const YAJLParserException;
-extern NSString *const YAJLParsingUnsupportedException;
-
-extern NSString *const YAJLParserValueKey; // Key in NSError userInfo for value we errored on
-
-#ifdef DEBUG
-#define YAJLDebug(...) NSLog(__VA_ARGS__)
-#else
-#define YAJLDebug(...) do {} while(0)
-#endif
-
-typedef enum {
- YAJLParserErrorCodeAllocError = -1000,
- YAJLParserErrorCodeDoubleOverflow = -1001,
- YAJLParserErrorCodeIntegerOverflow = -1002
-} YAJLParserErrorCode;
-
-/*!
- @enum Parser options
- @constant YAJLParserOptionsAllowComments Javascript style comments will be allowed in the input (both /&asterisk; &asterisk;/ and //)
- @constant YAJLParserOptionsCheckUTF8 Invalid UTF8 strings will cause a parse error
- */
-enum {
- YAJLParserOptionsNone = 0,
- YAJLParserOptionsAllowComments = 1 << 0, // Allows comments in JSON
- YAJLParserOptionsCheckUTF8 = 1 << 1, // If YES will verify UTF-8
- YAJLParserOptionsStrictPrecision = 1 << 2, // If YES will force strict precision and return integer overflow error
-};
-typedef NSUInteger YAJLParserOptions;
-
-enum {
- YAJLParserStatusNone = 0,
- YAJLParserStatusOK = 1,
- YAJLParserStatusInsufficientData = 2,
- YAJLParserStatusError = 3
-};
-typedef NSUInteger YAJLParserStatus;
-
-
-@class YAJLParser;
-
-
-@protocol YAJLParserDelegate <NSObject>
-
-- (void)parserDidStartDictionary:(YAJLParser *)parser;
-- (void)parserDidEndDictionary:(YAJLParser *)parser;
-
-- (void)parserDidStartArray:(YAJLParser *)parser;
-- (void)parserDidEndArray:(YAJLParser *)parser;
-
-- (void)parser:(YAJLParser *)parser didMapKey:(NSString *)key;
-
-/*!
- Did add value.
- @param parser Sender
- @param value Value of type NSNull, NSString or NSNumber
- */
-- (void)parser:(YAJLParser *)parser didAdd:(id)value;
-
-@end
-
-
-@interface YAJLParser : NSObject {
-
- yajl_handle handle_;
-
- id <YAJLParserDelegate> delegate_; // weak
-
- YAJLParserOptions parserOptions_;
-
- NSError *parserError_;
-}
-
-@property (assign, nonatomic) id <YAJLParserDelegate> delegate;
-@property (readonly, retain, nonatomic) NSError *parserError;
-@property (readonly, nonatomic) YAJLParserOptions parserOptions;
-
-/*!
- Create parser with data and options.
- @param parserOptions
- */
-- (id)initWithParserOptions:(YAJLParserOptions)parserOptions;
-
-/*!
- Parse data.
-
- If streaming, you can call parse multiple times as long as
- previous calls return YAJLParserStatusInsufficientData.
-
- @param data
- @result See YAJLParserStatus
- */
-- (YAJLParserStatus)parse:(NSData *)data;
-
-@end
diff --git a/lib/YAJL-objc/src/yajl_common.h b/lib/YAJL-objc/src/yajl_common.h
deleted file mode 100644
index a227deb..0000000
--- a/lib/YAJL-objc/src/yajl_common.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2010, Lloyd Hilaiel.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. Neither the name of Lloyd Hilaiel nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef __YAJL_COMMON_H__
-#define __YAJL_COMMON_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define YAJL_MAX_DEPTH 128
-
-/* msft dll export gunk. To build a DLL on windows, you
- * must define WIN32, YAJL_SHARED, and YAJL_BUILD. To use a shared
- * DLL, you must define YAJL_SHARED and WIN32 */
-#if defined(WIN32) && defined(YAJL_SHARED)
-# ifdef YAJL_BUILD
-# define YAJL_API __declspec(dllexport)
-# else
-# define YAJL_API __declspec(dllimport)
-# endif
-#else
-# define YAJL_API
-#endif
-
-/** pointer to a malloc function, supporting client overriding memory
- * allocation routines */
-typedef void * (*yajl_malloc_func)(void *ctx, unsigned int sz);
-
-/** pointer to a free function, supporting client overriding memory
- * allocation routines */
-typedef void (*yajl_free_func)(void *ctx, void * ptr);
-
-/** pointer to a realloc function which can resize an allocation. */
-typedef void * (*yajl_realloc_func)(void *ctx, void * ptr, unsigned int sz);
-
-/** A structure which can be passed to yajl_*_alloc routines to allow the
- * client to specify memory allocation functions to be used. */
-typedef struct
-{
- /** pointer to a function that can allocate uninitialized memory */
- yajl_malloc_func malloc;
- /** pointer to a function that can resize memory allocations */
- yajl_realloc_func realloc;
- /** pointer to a function that can free memory allocated using
- * reallocFunction or mallocFunction */
- yajl_free_func free;
- /** a context pointer that will be passed to above allocation routines */
- void * ctx;
-} yajl_alloc_funcs;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/YAJL-objc/src/yajl_gen.h b/lib/YAJL-objc/src/yajl_gen.h
deleted file mode 100644
index 97c2042..0000000
--- a/lib/YAJL-objc/src/yajl_gen.h
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright 2010, Lloyd Hilaiel.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. Neither the name of Lloyd Hilaiel nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * \file yajl_gen.h
- * Interface to YAJL's JSON generation facilities.
- */
-
-#include "yajl_common.h"
-
-#ifndef __YAJL_GEN_H__
-#define __YAJL_GEN_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- /** generator status codes */
- typedef enum {
- /** no error */
- yajl_gen_status_ok = 0,
- /** at a point where a map key is generated, a function other than
- * yajl_gen_string was called */
- yajl_gen_keys_must_be_strings,
- /** YAJL's maximum generation depth was exceeded. see
- * YAJL_MAX_DEPTH */
- yajl_max_depth_exceeded,
- /** A generator function (yajl_gen_XXX) was called while in an error
- * state */
- yajl_gen_in_error_state,
- /** A complete JSON document has been generated */
- yajl_gen_generation_complete,
- /** yajl_gen_double was passed an invalid floating point value
- * (infinity or NaN). */
- yajl_gen_invalid_number,
- /** A print callback was passed in, so there is no internal
- * buffer to get from */
- yajl_gen_no_buf
- } yajl_gen_status;
-
- /** an opaque handle to a generator */
- typedef struct yajl_gen_t * yajl_gen;
-
- /** a callback used for "printing" the results. */
- typedef void (*yajl_print_t)(void * ctx,
- const char * str,
- unsigned int len);
-
- /** configuration structure for the generator */
- typedef struct {
- /** generate indented (beautiful) output */
- unsigned int beautify;
- /** an opportunity to define an indent string. such as \\t or
- * some number of spaces. default is four spaces ' '. This
- * member is only relevant when beautify is true */
- const char * indentString;
- } yajl_gen_config;
-
- /** allocate a generator handle
- * \param config a pointer to a structure containing parameters which
- * configure the behavior of the json generator
- * \param allocFuncs an optional pointer to a structure which allows
- * the client to overide the memory allocation
- * used by yajl. May be NULL, in which case
- * malloc/free/realloc will be used.
- *
- * \returns an allocated handle on success, NULL on failure (bad params)
- */
- YAJL_API yajl_gen yajl_gen_alloc(const yajl_gen_config * config,
- const yajl_alloc_funcs * allocFuncs);
-
- /** allocate a generator handle that will print to the specified
- * callback rather than storing the results in an internal buffer.
- * \param callback a pointer to a printer function. May be NULL
- * in which case, the results will be store in an
- * internal buffer.
- * \param config a pointer to a structure containing parameters
- * which configure the behavior of the json
- * generator.
- * \param allocFuncs an optional pointer to a structure which allows
- * the client to overide the memory allocation
- * used by yajl. May be NULL, in which case
- * malloc/free/realloc will be used.
- * \param ctx a context pointer that will be passed to the
- * printer callback.
- *
- * \returns an allocated handle on success, NULL on failure (bad params)
- */
- YAJL_API yajl_gen yajl_gen_alloc2(const yajl_print_t callback,
- const yajl_gen_config * config,
- const yajl_alloc_funcs * allocFuncs,
- void * ctx);
-
- /** free a generator handle */
- YAJL_API void yajl_gen_free(yajl_gen handle);
-
- YAJL_API yajl_gen_status yajl_gen_integer(yajl_gen hand, long int number);
- /** generate a floating point number. number may not be infinity or
- * NaN, as these have no representation in JSON. In these cases the
- * generator will return 'yajl_gen_invalid_number' */
- YAJL_API yajl_gen_status yajl_gen_double(yajl_gen hand, double number);
- YAJL_API yajl_gen_status yajl_gen_number(yajl_gen hand,
- const char * num,
- unsigned int len);
- YAJL_API yajl_gen_status yajl_gen_string(yajl_gen hand,
- const unsigned char * str,
- unsigned int len);
- YAJL_API yajl_gen_status yajl_gen_null(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_bool(yajl_gen hand, int boolean);
- YAJL_API yajl_gen_status yajl_gen_map_open(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_map_close(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_array_open(yajl_gen hand);
- YAJL_API yajl_gen_status yajl_gen_array_close(yajl_gen hand);
-
- /** access the null terminated generator buffer. If incrementally
- * outputing JSON, one should call yajl_gen_clear to clear the
- * buffer. This allows stream generation. */
- YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand,
- const unsigned char ** buf,
- unsigned int * len);
-
- /** clear yajl's output buffer, but maintain all internal generation
- * state. This function will not "reset" the generator state, and is
- * intended to enable incremental JSON outputing. */
- YAJL_API void yajl_gen_clear(yajl_gen hand);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/YAJL-objc/src/yajl_parse.h b/lib/YAJL-objc/src/yajl_parse.h
deleted file mode 100644
index a3dcffc..0000000
--- a/lib/YAJL-objc/src/yajl_parse.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright 2010, Lloyd Hilaiel.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. Neither the name of Lloyd Hilaiel nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * \file yajl_parse.h
- * Interface to YAJL's JSON parsing facilities.
- */
-
-#include "yajl_common.h"
-
-#ifndef __YAJL_PARSE_H__
-#define __YAJL_PARSE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- /** error codes returned from this interface */
- typedef enum {
- /** no error was encountered */
- yajl_status_ok,
- /** a client callback returned zero, stopping the parse */
- yajl_status_client_canceled,
- /** The parse cannot yet complete because more json input text
- * is required, call yajl_parse with the next buffer of input text.
- * (pertinent only when stream parsing) */
- yajl_status_insufficient_data,
- /** An error occured during the parse. Call yajl_get_error for
- * more information about the encountered error */
- yajl_status_error
- } yajl_status;
-
- /** attain a human readable, english, string for an error */
- YAJL_API const char * yajl_status_to_string(yajl_status code);
-
- /** an opaque handle to a parser */
- typedef struct yajl_handle_t * yajl_handle;
-
- /** yajl is an event driven parser. this means as json elements are
- * parsed, you are called back to do something with the data. The
- * functions in this table indicate the various events for which
- * you will be called back. Each callback accepts a "context"
- * pointer, this is a void * that is passed into the yajl_parse
- * function which the client code may use to pass around context.
- *
- * All callbacks return an integer. If non-zero, the parse will
- * continue. If zero, the parse will be canceled and
- * yajl_status_client_canceled will be returned from the parse.
- *
- * Note about handling of numbers:
- * yajl will only convert numbers that can be represented in a double
- * or a long int. All other numbers will be passed to the client
- * in string form using the yajl_number callback. Furthermore, if
- * yajl_number is not NULL, it will always be used to return numbers,
- * that is yajl_integer and yajl_double will be ignored. If
- * yajl_number is NULL but one of yajl_integer or yajl_double are
- * defined, parsing of a number larger than is representable
- * in a double or long int will result in a parse error.
- */
- typedef struct {
- int (* yajl_null)(void * ctx);
- int (* yajl_boolean)(void * ctx, int boolVal);
- int (* yajl_integer)(void * ctx, long integerVal);
- int (* yajl_double)(void * ctx, double doubleVal);
- /** A callback which passes the string representation of the number
- * back to the client. Will be used for all numbers when present */
- int (* yajl_number)(void * ctx, const char * numberVal,
- unsigned int numberLen);
-
- /** strings are returned as pointers into the JSON text when,
- * possible, as a result, they are _not_ null padded */
- int (* yajl_string)(void * ctx, const unsigned char * stringVal,
- unsigned int stringLen);
-
- int (* yajl_start_map)(void * ctx);
- int (* yajl_map_key)(void * ctx, const unsigned char * key,
- unsigned int stringLen);
- int (* yajl_end_map)(void * ctx);
-
- int (* yajl_start_array)(void * ctx);
- int (* yajl_end_array)(void * ctx);
- } yajl_callbacks;
-
- /** configuration structure for the generator */
- typedef struct {
- /** if nonzero, javascript style comments will be allowed in
- * the json input, both slash star and slash slash */
- unsigned int allowComments;
- /** if nonzero, invalid UTF8 strings will cause a parse
- * error */
- unsigned int checkUTF8;
- } yajl_parser_config;
-
- /** allocate a parser handle
- * \param callbacks a yajl callbacks structure specifying the
- * functions to call when different JSON entities
- * are encountered in the input text. May be NULL,
- * which is only useful for validation.
- * \param config configuration parameters for the parse.
- * \param ctx a context pointer that will be passed to callbacks.
- */
- YAJL_API yajl_handle yajl_alloc(const yajl_callbacks * callbacks,
- const yajl_parser_config * config,
- const yajl_alloc_funcs * allocFuncs,
- void * ctx);
-
- /** free a parser handle */
- YAJL_API void yajl_free(yajl_handle handle);
-
- /** Parse some json!
- * \param hand - a handle to the json parser allocated with yajl_alloc
- * \param jsonText - a pointer to the UTF8 json text to be parsed
- * \param jsonTextLength - the length, in bytes, of input text
- */
- YAJL_API yajl_status yajl_parse(yajl_handle hand,
- const unsigned char * jsonText,
- unsigned int jsonTextLength);
-
- /** Parse any remaining buffered json.
- * Since yajl is a stream-based parser, without an explicit end of
- * input, yajl sometimes can't decide if content at the end of the
- * stream is valid or not. For example, if "1" has been fed in,
- * yajl can't know whether another digit is next or some character
- * that would terminate the integer token.
- *
- * \param hand - a handle to the json parser allocated with yajl_alloc
- */
- YAJL_API yajl_status yajl_parse_complete(yajl_handle hand);
-
- /** get an error string describing the state of the
- * parse.
- *
- * If verbose is non-zero, the message will include the JSON
- * text where the error occured, along with an arrow pointing to
- * the specific char.
- *
- * \returns A dynamically allocated string will be returned which should
- * be freed with yajl_free_error
- */
- YAJL_API unsigned char * yajl_get_error(yajl_handle hand, int verbose,
- const unsigned char * jsonText,
- unsigned int jsonTextLength);
-
- /**
- * get the amount of data consumed from the last chunk passed to YAJL.
- *
- * In the case of a successful parse this can help you understand if
- * the entire buffer was consumed (which will allow you to handle
- * "junk at end of input".
- *
- * In the event an error is encountered during parsing, this function
- * affords the client a way to get the offset into the most recent
- * chunk where the error occured. 0 will be returned if no error
- * was encountered.
- */
- YAJL_API unsigned int yajl_get_bytes_consumed(yajl_handle hand);
-
- /** free an error returned from yajl_get_error */
- YAJL_API void yajl_free_error(yajl_handle hand, unsigned char * str);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
index 3d0171b..e60fee3 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
@@ -1,452 +1,449 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
- activeBuildConfigurationName = Debug;
+ activeBuildConfigurationName = Release;
activeTarget = D2AAC07D0554694100DB518D /* TouchJSON */;
addToTargets = (
D2AAC07D0554694100DB518D /* TouchJSON */,
);
codeSenseManager = 431C7D3511A4025F004F2B13 /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
916,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
876,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 300579588;
- PBXWorkspaceStateSaveDate = 300579588;
+ PBXPerProjectTemplateStateSaveDate = 300890743;
+ PBXWorkspaceStateSaveDate = 300890743;
};
perUserProjectItems = {
- 431C7D8811A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8811A4042B004F2B13 /* PBXTextBookmark */;
431C7D8911A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8911A4042B004F2B13 /* PBXTextBookmark */;
431C7D8C11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8C11A4042B004F2B13 /* PBXTextBookmark */;
431C7D8E11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8E11A4042B004F2B13 /* PBXTextBookmark */;
431C7D9011A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9011A4042B004F2B13 /* PBXTextBookmark */;
431C7D9111A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9111A4042B004F2B13 /* PBXTextBookmark */;
- 431C7D9211A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9211A4042B004F2B13 /* PBXTextBookmark */;
- 431C7D9311A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9311A4042B004F2B13 /* PBXTextBookmark */;
- 431C7D9411A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9411A4042B004F2B13 /* PBXTextBookmark */;
431C7D9511A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9511A4042B004F2B13 /* PBXTextBookmark */;
431C7D9611A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9611A4042B004F2B13 /* PBXTextBookmark */;
431C7D9711A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9711A4042B004F2B13 /* PBXTextBookmark */;
431C7D9811A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9811A4042B004F2B13 /* PBXTextBookmark */;
431C7D9911A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9911A4042B004F2B13 /* PBXTextBookmark */;
431C7DC711A405A8004F2B13 /* PBXTextBookmark */ = 431C7DC711A405A8004F2B13 /* PBXTextBookmark */;
4322F50A11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50A11EA7D4500A9CEF0 /* PBXTextBookmark */;
4322F50B11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50B11EA7D4500A9CEF0 /* PBXTextBookmark */;
- 4322F50C11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50C11EA7D4500A9CEF0 /* PBXTextBookmark */;
- 4322F50D11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50D11EA7D4500A9CEF0 /* PBXTextBookmark */;
438E39CB11A5864B0028F47F /* PBXTextBookmark */ = 438E39CB11A5864B0028F47F /* PBXTextBookmark */;
438E39CC11A5864B0028F47F /* PBXTextBookmark */ = 438E39CC11A5864B0028F47F /* PBXTextBookmark */;
+ 43FD6AC611EF3A07005EE5A3 /* PBXTextBookmark */ = 43FD6AC611EF3A07005EE5A3 /* PBXTextBookmark */;
+ 43FD6AC711EF3A07005EE5A3 /* PBXTextBookmark */ = 43FD6AC711EF3A07005EE5A3 /* PBXTextBookmark */;
+ 43FD6AC811EF3A07005EE5A3 /* PBXTextBookmark */ = 43FD6AC811EF3A07005EE5A3 /* PBXTextBookmark */;
+ 43FD6B0011EF3AD8005EE5A3 /* PBXTextBookmark */ = 43FD6B0011EF3AD8005EE5A3 /* PBXTextBookmark */;
+ 43FD6B0111EF3AD8005EE5A3 /* PBXTextBookmark */ = 43FD6B0111EF3AD8005EE5A3 /* PBXTextBookmark */;
+ 43FD6B0211EF3AD8005EE5A3 /* PBXTextBookmark */ = 43FD6B0211EF3AD8005EE5A3 /* PBXTextBookmark */;
};
sourceControlManager = 431C7D3411A4025F004F2B13 /* Source Control */;
userBuildSettings = {
};
};
431C7D3411A4025F004F2B13 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
431C7D3511A4025F004F2B13 /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
431C7D4111A402BC004F2B13 /* CDataScanner.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 897}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{1333, 1062}";
+ sepNavSelRange = "{2388, 0}";
+ sepNavVisRange = "{1349, 1046}";
};
};
431C7D4211A402BC004F2B13 /* CDataScanner.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 3198}}";
sepNavSelRange = "{1247, 61}";
- sepNavVisRange = "{0, 1760}";
+ sepNavVisRange = "{0, 1310}";
};
};
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 1453}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 494}}";
+ sepNavSelRange = "{665, 0}";
+ sepNavVisRange = "{33, 1355}";
};
};
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 1053}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{1220, 1320}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 975}}";
+ sepNavSelRange = "{1391, 0}";
+ sepNavVisRange = "{1220, 885}";
};
};
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1402}";
};
};
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1132, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1841}";
};
};
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1432}";
};
};
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1555}";
};
};
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{759, 0}";
sepNavVisRange = "{0, 1622}";
};
};
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1417}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1836}";
};
};
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1814}";
};
};
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 3016}}";
sepNavSelRange = "{2802, 19}";
sepNavVisRange = "{1967, 908}";
};
};
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 598}}";
sepNavSelRange = "{1394, 17}";
sepNavVisRange = "{0, 1428}";
};
};
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1170}}";
sepNavSelRange = "{1254, 80}";
sepNavVisRange = "{0, 1910}";
};
};
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1566, 624}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{537, 1390}";
};
};
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1027}}";
sepNavSelRange = "{1252, 60}";
sepNavVisRange = "{0, 1612}";
};
};
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 533}}";
sepNavSelRange = "{780, 0}";
sepNavVisRange = "{89, 1360}";
};
};
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 715}}";
sepNavSelRange = "{1254, 32}";
sepNavVisRange = "{0, 1531}";
};
};
431C7D8211A4037C004F2B13 /* TouchJSON.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
- sepNavSelRange = "{369, 0}";
- sepNavVisRange = "{0, 369}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 414}}";
+ sepNavSelRange = "{161, 0}";
+ sepNavVisRange = "{0, 308}";
};
};
- 431C7D8811A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4211A402BC004F2B13 /* CDataScanner.m */;
- name = "CDataScanner.m: 30";
- rLen = 61;
- rLoc = 1247;
- rType = 0;
- vrLen = 1760;
- vrLoc = 0;
- };
431C7D8911A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */;
name = "CJSONDataSerializer.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1814;
vrLoc = 0;
};
431C7D8C11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */;
name = "CJSONDeserializer.m: 30";
rLen = 80;
rLoc = 1254;
rType = 0;
vrLen = 1910;
vrLoc = 0;
};
431C7D8E11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5411A402BC004F2B13 /* CJSONSerializer.m */;
name = "CJSONSerializer.m: 30";
rLen = 60;
rLoc = 1252;
rType = 0;
vrLen = 1612;
vrLoc = 0;
};
431C7D9011A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */;
name = "CSerializedJSONData.m: 30";
rLen = 32;
rLoc = 1254;
rType = 0;
vrLen = 1531;
vrLoc = 0;
};
431C7D9111A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */;
name = "TouchJSON_Prefix.pch: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 188;
vrLoc = 0;
};
- 431C7D9211A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */;
- name = "TouchJSON.h: 17";
- rLen = 0;
- rLoc = 369;
- rType = 0;
- vrLen = 369;
- vrLoc = 0;
- };
- 431C7D9311A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */;
- name = "CDataScanner_Extensions.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1453;
- vrLoc = 0;
- };
- 431C7D9411A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */;
- name = "CDataScanner_Extensions.m: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1320;
- vrLoc = 1220;
- };
431C7D9511A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */;
name = "NSCharacterSet_Extensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1402;
vrLoc = 0;
};
431C7D9611A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */;
name = "NSCharacterSet_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1841;
vrLoc = 0;
};
431C7D9711A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */;
name = "NSDictionary_JSONExtensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1432;
vrLoc = 0;
};
431C7D9811A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */;
name = "NSDictionary_JSONExtensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1555;
vrLoc = 0;
};
431C7D9911A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */;
name = "NSScanner_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1836;
vrLoc = 0;
};
431C7DC711A405A8004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */;
name = "NSScanner_Extensions.h: 19";
rLen = 0;
rLoc = 759;
rType = 0;
vrLen = 1622;
vrLoc = 0;
};
4322F50A11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
name = "CSerializedJSONData.h: 20";
rLen = 0;
rLoc = 780;
rType = 0;
vrLen = 1360;
vrLoc = 89;
};
4322F50B11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5311A402BC004F2B13 /* CJSONSerializer.h */;
name = "CJSONSerializer.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1390;
vrLoc = 537;
};
- 4322F50C11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
- name = "CDataScanner.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1348;
- vrLoc = 0;
- };
- 4322F50D11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
- name = "CDataScanner.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1062;
- vrLoc = 1333;
- };
438E39CB11A5864B0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */;
name = "CJSONDeserializer.h: 34";
rLen = 17;
rLoc = 1394;
rType = 0;
vrLen = 1428;
vrLoc = 0;
};
438E39CC11A5864B0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */;
name = "CJSONDataSerializer.m: 91";
rLen = 19;
rLoc = 2802;
rType = 0;
vrLen = 908;
vrLoc = 1967;
};
+ 43FD6AC611EF3A07005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */;
+ name = "CDataScanner_Extensions.m: 35";
+ rLen = 0;
+ rLoc = 1391;
+ rType = 0;
+ vrLen = 885;
+ vrLoc = 1220;
+ };
+ 43FD6AC711EF3A07005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4211A402BC004F2B13 /* CDataScanner.m */;
+ name = "CDataScanner.m: 30";
+ rLen = 61;
+ rLoc = 1247;
+ rType = 0;
+ vrLen = 1310;
+ vrLoc = 0;
+ };
+ 43FD6AC811EF3A07005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
+ name = "CDataScanner.h: 66";
+ rLen = 0;
+ rLoc = 2388;
+ rType = 0;
+ vrLen = 1046;
+ vrLoc = 1349;
+ };
+ 43FD6B0011EF3AD8005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */;
+ name = "CDataScanner_Extensions.h: 17";
+ rLen = 0;
+ rLoc = 665;
+ rType = 0;
+ vrLen = 1355;
+ vrLoc = 33;
+ };
+ 43FD6B0111EF3AD8005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */;
+ rLen = 0;
+ rLoc = 161;
+ rType = 0;
+ };
+ 43FD6B0211EF3AD8005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */;
+ name = "TouchJSON.h: 10";
+ rLen = 0;
+ rLoc = 161;
+ rType = 0;
+ vrLen = 308;
+ vrLoc = 0;
+ };
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 188}";
};
};
D2AAC07D0554694100DB518D /* TouchJSON */ = {
activeExec = 0;
};
}
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3 b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
index ab5102d..83d4c5f 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
@@ -1,1185 +1,1257 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
- <array/>
+ <array>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict>
+ <key>PBXStatusErrorsKey</key>
+ <integer>0</integer>
+ </dict>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict>
+ <key>PBXStatusErrorsKey</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict>
+ <key>PBXStatusWarningsKey</key>
+ <integer>0</integer>
+ </dict>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict>
+ <key>PBXStatusWarningsKey</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict>
+ <key>PBXStatusAnalyzerResultsKey</key>
+ <integer>0</integer>
+ </dict>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict>
+ <key>PBXStatusAnalyzerResultsKey</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ </array>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
<real>241</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>431C7D4311A402BC004F2B13</string>
<string>431C7D4C11A402BC004F2B13</string>
<string>32C88DFF0371C24200C91783</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>2</integer>
- <integer>1</integer>
- <integer>0</integer>
+ <integer>30</integer>
+ <integer>29</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 0}, {263, 691}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {280, 709}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
<real>241</real>
</array>
<key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>141 260 1440 750 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
<string>280pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CDataScanner.h</string>
+ <string>TouchJSON.h</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CDataScanner.h</string>
+ <string>TouchJSON.h</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>4322F50D11EA7D4500A9CEF0</string>
+ <string>43FD6B0211EF3AD8005EE5A3</string>
<key>history</key>
<array>
- <string>431C7D8811A4042B004F2B13</string>
<string>431C7D8911A4042B004F2B13</string>
<string>431C7D8C11A4042B004F2B13</string>
<string>431C7D8E11A4042B004F2B13</string>
<string>431C7D9011A4042B004F2B13</string>
<string>431C7D9111A4042B004F2B13</string>
- <string>431C7D9211A4042B004F2B13</string>
- <string>431C7D9311A4042B004F2B13</string>
- <string>431C7D9411A4042B004F2B13</string>
<string>431C7D9511A4042B004F2B13</string>
<string>431C7D9611A4042B004F2B13</string>
<string>431C7D9711A4042B004F2B13</string>
<string>431C7D9811A4042B004F2B13</string>
<string>431C7D9911A4042B004F2B13</string>
<string>431C7DC711A405A8004F2B13</string>
<string>438E39CB11A5864B0028F47F</string>
<string>438E39CC11A5864B0028F47F</string>
<string>4322F50A11EA7D4500A9CEF0</string>
<string>4322F50B11EA7D4500A9CEF0</string>
- <string>4322F50C11EA7D4500A9CEF0</string>
+ <string>43FD6AC611EF3A07005EE5A3</string>
+ <string>43FD6AC711EF3A07005EE5A3</string>
+ <string>43FD6AC811EF3A07005EE5A3</string>
+ <string>43FD6B0011EF3AD8005EE5A3</string>
+ <string>43FD6B0111EF3AD8005EE5A3</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1155, 481}}</string>
+ <string>{{0, 0}, {1155, 446}}</string>
<key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>141 260 1440 750 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>481pt</string>
+ <string>446pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>223pt</string>
+ <string>258pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1155, 196}}</string>
- <key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>{{10, 27}, {1155, 231}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1155, 184}}</string>
+ <string>{{10, 27}, {1155, 231}}</string>
+ <key>RubberWindowFrame</key>
+ <string>141 260 1440 750 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 31}, {603, 297}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
- <integer>1021</integer>
+ <integer>1024</integer>
<key>XCBuildResultsTrigger_Open</key>
- <integer>1011</integer>
+ <integer>1013</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1155, 205}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
<string>1155pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
- <string>4322F50E11EA7D4500A9CEF0</string>
+ <string>43FD6B0311EF3AD8005EE5A3</string>
<string>1CA23ED40692098700951B8B</string>
- <string>4322F50F11EA7D4500A9CEF0</string>
+ <string>43FD6B0411EF3AD8005EE5A3</string>
<string>433104F70F1280740091B39C</string>
- <string>4322F51011EA7D4500A9CEF0</string>
+ <string>43FD6B0511EF3AD8005EE5A3</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.ide.XCBreakpointsToolbarItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1440, 218}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {720, 252}}</string>
<string>{{720, 0}, {720, 252}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1440, 252}}</string>
<string>{{0, 252}, {1440, 253}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 223}, {1440, 505}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
<string>{{720, 0}, {720, 252}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>505pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
<string>436AD84810306A210068D6C9</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
<string>436AD84910306A210068D6C9</string>
<string>436AD84A10306A210068D6C9</string>
<string>436AD84B10306A210068D6C9</string>
<string>436AD84C10306A210068D6C9</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>0.0</real>
+ <real>300890840.965258</real>
<key>ToolbarDisplayMode</key>
- <integer>1</integer>
+ <integer>2</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/TouchJSON.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>141 260 1440 750 0 0 1680 1028 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.debuggerConsole</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAAC065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {700, 358}}</string>
<key>RubberWindowFrame</key>
<string>149 87 700 400 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Name</key>
<string>Debugger Console</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugCLIModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D5B069F1CE1000CFCEE</string>
<string>1C530D5C069F1CE1000CFCEE</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>149 87 440 400 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D5B069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.scm</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB2065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB3065D492600B07095</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {452, 0}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>0pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052920623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>SCM</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ConsoleFrame</key>
<string>{{0, 259}, {452, 0}}</string>
<key>Frame</key>
<string>{{0, 7}, {452, 259}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
<key>TableConfiguration</key>
<array>
<string>Status</string>
<real>30</real>
<string>FileName</string>
<real>199</real>
<string>Path</string>
<real>197.09500122070312</real>
</array>
<key>TableFrame</key>
<string>{{0, 0}, {452, 250}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Proportion</key>
<string>262pt</string>
</dict>
</array>
<key>Proportion</key>
<string>266pt</string>
</dict>
</array>
<key>Name</key>
<string>SCM</string>
<key>ServiceClasses</key>
<array>
<string>PBXCVSModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAB4065D492600B07095</string>
<string>1C78EAB5065D492600B07095</string>
<string>1C78EAB2065D492600B07095</string>
<string>1CD052920623707200166675</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.scmV3</string>
<key>WindowString</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CE0B1FE06471DED0097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>no</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>168</real>
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj b/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj
index a4daa76..f4a2fd6 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj
@@ -1,325 +1,319 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
431C7D5711A402BC004F2B13 /* CDataScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */; };
431C7D5811A402BC004F2B13 /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4211A402BC004F2B13 /* CDataScanner.m */; };
431C7D5911A402BC004F2B13 /* CDataScanner_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */; };
431C7D5A11A402BC004F2B13 /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */; };
431C7D5B11A402BC004F2B13 /* NSCharacterSet_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */; };
431C7D5C11A402BC004F2B13 /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */; };
431C7D5D11A402BC004F2B13 /* NSDictionary_JSONExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */; };
431C7D5E11A402BC004F2B13 /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */; };
431C7D5F11A402BC004F2B13 /* NSScanner_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */; };
431C7D6011A402BC004F2B13 /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */; };
431C7D6111A402BC004F2B13 /* CJSONDataSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */; };
431C7D6211A402BC004F2B13 /* CJSONDataSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */; };
431C7D6311A402BC004F2B13 /* CJSONDeserializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */; };
431C7D6411A402BC004F2B13 /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */; };
431C7D6511A402BC004F2B13 /* CJSONScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D5111A402BC004F2B13 /* CJSONScanner.h */; };
431C7D6611A402BC004F2B13 /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5211A402BC004F2B13 /* CJSONScanner.m */; };
431C7D6711A402BC004F2B13 /* CJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D5311A402BC004F2B13 /* CJSONSerializer.h */; };
431C7D6811A402BC004F2B13 /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5411A402BC004F2B13 /* CJSONSerializer.m */; };
431C7D6911A402BC004F2B13 /* CSerializedJSONData.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */; };
431C7D6A11A402BC004F2B13 /* CSerializedJSONData.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */; };
431C7D8311A4037C004F2B13 /* TouchJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */; };
AA747D9F0F9514B9006C5449 /* TouchJSON_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
431C7D4111A402BC004F2B13 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = "<group>"; };
431C7D4211A402BC004F2B13 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = "<group>"; };
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = "<group>"; };
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = "<group>"; };
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = "<group>"; };
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = "<group>"; };
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = "<group>"; };
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = "<group>"; };
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = "<group>"; };
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = "<group>"; };
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = "<group>"; };
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = "<group>"; };
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = "<group>"; };
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = "<group>"; };
431C7D5111A402BC004F2B13 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = "<group>"; };
431C7D5211A402BC004F2B13 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = "<group>"; };
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = "<group>"; };
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = "<group>"; };
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = "<group>"; };
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = "<group>"; };
431C7D8211A4037C004F2B13 /* TouchJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TouchJSON.h; path = TouchJSON/TouchJSON.h; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchJSON_Prefix.pch; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libTouchJSON.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTouchJSON.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libTouchJSON.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* TouchJSON */ = {
isa = PBXGroup;
children = (
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
431C7D8211A4037C004F2B13 /* TouchJSON.h */,
);
name = TouchJSON;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
431C7D4111A402BC004F2B13 /* CDataScanner.h */,
431C7D4211A402BC004F2B13 /* CDataScanner.m */,
431C7D4311A402BC004F2B13 /* Extensions */,
431C7D4C11A402BC004F2B13 /* JSON */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
431C7D4311A402BC004F2B13 /* Extensions */ = {
isa = PBXGroup;
children = (
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */,
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */,
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */,
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */,
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */,
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */,
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */,
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */,
);
path = Extensions;
sourceTree = "<group>";
};
431C7D4C11A402BC004F2B13 /* JSON */ = {
isa = PBXGroup;
children = (
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */,
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */,
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */,
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */,
431C7D5111A402BC004F2B13 /* CJSONScanner.h */,
431C7D5211A402BC004F2B13 /* CJSONScanner.m */,
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */,
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */,
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */,
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */,
);
path = JSON;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
AA747D9F0F9514B9006C5449 /* TouchJSON_Prefix.pch in Headers */,
431C7D5711A402BC004F2B13 /* CDataScanner.h in Headers */,
431C7D5911A402BC004F2B13 /* CDataScanner_Extensions.h in Headers */,
431C7D5B11A402BC004F2B13 /* NSCharacterSet_Extensions.h in Headers */,
431C7D5D11A402BC004F2B13 /* NSDictionary_JSONExtensions.h in Headers */,
431C7D5F11A402BC004F2B13 /* NSScanner_Extensions.h in Headers */,
431C7D6111A402BC004F2B13 /* CJSONDataSerializer.h in Headers */,
431C7D6311A402BC004F2B13 /* CJSONDeserializer.h in Headers */,
431C7D6511A402BC004F2B13 /* CJSONScanner.h in Headers */,
431C7D6711A402BC004F2B13 /* CJSONSerializer.h in Headers */,
431C7D6911A402BC004F2B13 /* CSerializedJSONData.h in Headers */,
431C7D8311A4037C004F2B13 /* TouchJSON.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* TouchJSON */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "TouchJSON" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = TouchJSON;
productName = TouchJSON;
productReference = D2AAC07E0554694100DB518D /* libTouchJSON.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "TouchJSON" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* TouchJSON */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* TouchJSON */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
431C7D5811A402BC004F2B13 /* CDataScanner.m in Sources */,
431C7D5A11A402BC004F2B13 /* CDataScanner_Extensions.m in Sources */,
431C7D5C11A402BC004F2B13 /* NSCharacterSet_Extensions.m in Sources */,
431C7D5E11A402BC004F2B13 /* NSDictionary_JSONExtensions.m in Sources */,
431C7D6011A402BC004F2B13 /* NSScanner_Extensions.m in Sources */,
431C7D6211A402BC004F2B13 /* CJSONDataSerializer.m in Sources */,
431C7D6411A402BC004F2B13 /* CJSONDeserializer.m in Sources */,
431C7D6611A402BC004F2B13 /* CJSONScanner.m in Sources */,
431C7D6811A402BC004F2B13 /* CJSONSerializer.m in Sources */,
431C7D6A11A402BC004F2B13 /* CSerializedJSONData.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/TouchJSON.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TouchJSON_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
- OTHER_LDFLAGS = (
- "-all_load",
- "-ObjC",
- );
+ OTHER_LDFLAGS = "";
PRODUCT_NAME = TouchJSON;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/TouchJSON.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TouchJSON_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
- OTHER_LDFLAGS = (
- "-all_load",
- "-ObjC",
- );
+ OTHER_LDFLAGS = "";
PRODUCT_NAME = TouchJSON;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- OTHER_LDFLAGS = "-ObjC";
+ OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- OTHER_LDFLAGS = "-ObjC";
+ OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "TouchJSON" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "TouchJSON" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
diff --git a/lib/touchjson-objc/src/TouchJSON/TouchJSON.h b/lib/touchjson-objc/src/TouchJSON/TouchJSON.h
index f1253d7..0bc0754 100644
--- a/lib/touchjson-objc/src/TouchJSON/TouchJSON.h
+++ b/lib/touchjson-objc/src/TouchJSON/TouchJSON.h
@@ -1,16 +1,14 @@
/*
* TouchJSON.h
* TouchJSON
*
* Created by Ludovic Galabru on 19/05/10.
* Copyright 2010 Software Engineering Task Force. All rights reserved.
*
*/
-#import "CDataScanner.h"
-#import "CDataScanner_Extensions.h"
#import "CJSONDataSerializer.h"
#import "CJSONDeserializer.h"
#import "CJSONScanner.h"
#import "CJSONSerializer.h"
#import "CSerializedJSONData.h"
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
index 2f19530..078a689 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
+++ b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
@@ -1,944 +1,707 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
- activeBuildConfigurationName = Debug;
- activeSDKPreference = iphonesimulator4.0;
+ activeBuildConfigurationName = Release;
+ activeSDKPreference = iphoneos4.0;
activeTarget = D2AAC07D0554694100DB518D /* CloudKit */;
addToTargets = (
D2AAC07D0554694100DB518D /* CloudKit */,
);
breakpoints = (
);
codeSenseManager = 43A20CA0116DBEAB00BA930A /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 968,
+ 1072,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 928,
+ 1032,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 300613003;
- PBXWorkspaceStateSaveDate = 300613003;
+ PBXPerProjectTemplateStateSaveDate = 300957655;
+ PBXWorkspaceStateSaveDate = 300957655;
};
perUserProjectItems = {
4305392211A5366B003C39C8 /* PBXTextBookmark */ = 4305392211A5366B003C39C8 /* PBXTextBookmark */;
4305392311A5366B003C39C8 /* PBXTextBookmark */ = 4305392311A5366B003C39C8 /* PBXTextBookmark */;
431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6011A4200A004F2B13 /* PBXTextBookmark */;
431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6211A4200A004F2B13 /* PBXTextBookmark */;
431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */ = 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */;
4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */ = 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */;
4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */;
- 4322F4B911EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4B911EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4BA11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BA11EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4BB11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BB11EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4BC11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BC11EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4BD11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BD11EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4BF11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BF11EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4C011EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4C011EA78B800A9CEF0 /* PBXTextBookmark */;
- 4322F4CB11EA791D00A9CEF0 /* PBXTextBookmark */ = 4322F4CB11EA791D00A9CEF0 /* PBXTextBookmark */;
- 4322F50811EA7D3F00A9CEF0 /* PBXTextBookmark */ = 4322F50811EA7D3F00A9CEF0 /* PBXTextBookmark */;
4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */;
- 4322F53911EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53911EA7F5F00A9CEF0 /* PBXTextBookmark */;
4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */;
- 4322F56111EAFD0E00A9CEF0 /* PBXTextBookmark */ = 4322F56111EAFD0E00A9CEF0 /* PBXTextBookmark */;
- 4322F56211EAFD0E00A9CEF0 /* PBXTextBookmark */ = 4322F56211EAFD0E00A9CEF0 /* PBXTextBookmark */;
- 4322F56411EAFD3E00A9CEF0 /* PBXTextBookmark */ = 4322F56411EAFD3E00A9CEF0 /* PBXTextBookmark */;
4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B011EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B111EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B211EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B211EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B311EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B411EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B511EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B511EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5B611EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B611EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B711EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B811EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */;
4322F5B911EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5BA11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BA11EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5BB11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BB11EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5BC11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BC11EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5BD11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BD11EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5BF11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BF11EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5C111EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5C111EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5C211EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5C211EB004600A9CEF0 /* PBXTextBookmark */;
- 4322F5C311EB004600A9CEF0 /* XCBuildMessageTextBookmark */ = 4322F5C311EB004600A9CEF0 /* XCBuildMessageTextBookmark */;
- 4322F5C511EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5C511EB004600A9CEF0 /* PBXTextBookmark */;
- 432D5B4811E7154D000F86DD /* PBXTextBookmark */ = 432D5B4811E7154D000F86DD /* PBXTextBookmark */;
+ 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */ = 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */;
436F8B4111E463E900D37395 /* PBXTextBookmark */ = 436F8B4111E463E900D37395 /* PBXTextBookmark */;
436F8DC011E4818800D37395 /* PBXTextBookmark */ = 436F8DC011E4818800D37395 /* PBXTextBookmark */;
436F8DC111E4818800D37395 /* PBXTextBookmark */ = 436F8DC111E4818800D37395 /* PBXTextBookmark */;
- 436F936311E4E8C700D37395 /* PBXTextBookmark */ = 436F936311E4E8C700D37395 /* PBXTextBookmark */;
- 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1511A58C1F0028F47F /* PBXTextBookmark */;
+ 4377A2C511EB42AB00D1909C /* PBXTextBookmark */ = 4377A2C511EB42AB00D1909C /* PBXTextBookmark */;
+ 4377A2F011EB446300D1909C /* PBXTextBookmark */ = 4377A2F011EB446300D1909C /* PBXTextBookmark */;
+ 4377A2F111EB446300D1909C /* PBXTextBookmark */ = 4377A2F111EB446300D1909C /* PBXTextBookmark */;
+ 4377A2FF11EB47C800D1909C /* PBXTextBookmark */ = 4377A2FF11EB47C800D1909C /* PBXTextBookmark */;
+ 4377A3BC11EC677F00D1909C /* PBXTextBookmark */ = 4377A3BC11EC677F00D1909C /* PBXTextBookmark */;
438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1711A58C1F0028F47F /* PBXTextBookmark */;
- 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = 438E3A9211A599EE0028F47F /* PBXTextBookmark */;
438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9B11A599EE0028F47F /* PBXTextBookmark */;
43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
+ 43FD6A5411EF3576005EE5A3 /* PBXTextBookmark */ = 43FD6A5411EF3576005EE5A3 /* PBXTextBookmark */;
+ 43FD6AF811EF3A87005EE5A3 /* PBXTextBookmark */ = 43FD6AF811EF3A87005EE5A3 /* PBXTextBookmark */;
+ 43FD6BA211EF4317005EE5A3 /* PBXTextBookmark */ = 43FD6BA211EF4317005EE5A3 /* PBXTextBookmark */;
+ 43FD6C1111F0414D005EE5A3 /* PBXTextBookmark */ = 43FD6C1111F0414D005EE5A3 /* PBXTextBookmark */;
};
sourceControlManager = 43A20C9F116DBEAB00BA930A /* Source Control */;
userBuildSettings = {
};
};
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{219, 28}";
sepNavVisRange = "{0, 253}";
};
};
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{253, 18}";
sepNavVisRange = "{0, 342}";
};
};
4305392211A5366B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */;
name = "NSMutableArray+CloudKitAdditions.h: 14";
rLen = 28;
rLoc = 219;
rType = 0;
vrLen = 253;
vrLoc = 0;
};
4305392311A5366B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */;
name = "NSMutableArray+CloudKitAdditions.m: 14";
rLen = 18;
rLoc = 253;
rType = 0;
vrLen = 342;
vrLoc = 0;
};
43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {3281, 1053}}";
sepNavSelRange = "{234, 0}";
sepNavVisRange = "{0, 439}";
};
};
4317EFEC1181DB510045FF78 /* CloudKit.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 464}}";
sepNavSelRange = "{320, 0}";
sepNavVisRange = "{0, 433}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
sepNavSelRange = "{736, 0}";
sepNavVisRange = "{0, 901}";
};
};
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
sepNavSelRange = "{336, 98}";
sepNavVisRange = "{0, 656}";
};
};
4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 345}}";
sepNavSelRange = "{365, 0}";
sepNavVisRange = "{0, 504}";
sepNavWindowFrame = "{{38, 294}, {750, 558}}";
};
};
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
- sepNavSelRange = "{410, 0}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 423}}";
+ sepNavSelRange = "{133, 0}";
sepNavVisRange = "{0, 833}";
};
};
4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
sepNavSelRange = "{305, 100}";
sepNavVisRange = "{0, 412}";
};
};
4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 442}}";
sepNavSelRange = "{225, 0}";
- sepNavVisRange = "{0, 829}";
+ sepNavVisRange = "{0, 824}";
};
};
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
sepNavSelRange = "{343, 98}";
sepNavVisRange = "{0, 580}";
};
};
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1348, 589}}";
sepNavSelRange = "{246, 0}";
sepNavVisRange = "{0, 271}";
};
};
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 494}}";
sepNavSelRange = "{307, 0}";
- sepNavVisRange = "{0, 781}";
+ sepNavVisRange = "{140, 646}";
};
};
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
sepNavSelRange = "{229, 0}";
sepNavVisRange = "{0, 851}";
};
};
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 702}}";
sepNavSelRange = "{1029, 134}";
sepNavVisRange = "{296, 988}";
};
};
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 884}}";
- sepNavSelRange = "{1757, 0}";
- sepNavVisRange = "{972, 1331}";
+ sepNavIntBoundsRect = "{{0, 0}, {1250, 871}}";
+ sepNavSelRange = "{1471, 0}";
+ sepNavVisRange = "{756, 1476}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 520}}";
- sepNavSelRange = "{625, 0}";
- sepNavVisRange = "{0, 719}";
+ sepNavSelRange = "{326, 0}";
+ sepNavVisRange = "{0, 634}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
sepNavSelRange = "{508, 0}";
sepNavVisRange = "{0, 899}";
};
};
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 1274}}";
- sepNavSelRange = "{2699, 0}";
- sepNavVisRange = "{41, 1067}";
+ sepNavSelRange = "{1590, 0}";
+ sepNavVisRange = "{1108, 1199}";
};
};
4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 1768}}";
sepNavSelRange = "{1106, 99}";
sepNavVisRange = "{733, 1037}";
};
};
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1348, 637}}";
sepNavSelRange = "{291, 19}";
sepNavVisRange = "{0, 1399}";
};
};
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 883}";
};
};
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 458}}";
sepNavSelRange = "{296, 0}";
sepNavVisRange = "{0, 334}";
};
};
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 458}}";
sepNavSelRange = "{240, 103}";
sepNavVisRange = "{0, 713}";
};
};
431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */;
name = "NSData+CloudKitAdditions.h: 12";
rLen = 11;
rLoc = 201;
rType = 0;
vrLen = 265;
vrLoc = 0;
};
431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */;
name = "NSData+CloudKitAdditions.m: 11";
rLen = 10;
rLoc = 209;
rType = 0;
vrLen = 1393;
vrLoc = 0;
};
431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */;
name = "NSKeyValueCoding.h: 127";
rLen = 30;
rLoc = 20057;
rType = 0;
vrLen = 2509;
vrLoc = 18489;
};
431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = NSKeyValueCoding.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h;
sourceTree = "<absolute>";
};
4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */;
name = "CloudKit.h: 16";
rLen = 0;
rLoc = 320;
rType = 0;
vrLen = 433;
vrLoc = 0;
};
4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */;
name = "NSDictionary+CloudKitAdditions.m: 14";
rLen = 103;
rLoc = 240;
rType = 0;
vrLen = 713;
vrLoc = 0;
};
4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */;
name = "NSURLRequest.h: 521";
rLen = 36;
rLoc = 20720;
rType = 0;
vrLen = 1375;
vrLoc = 21387;
};
4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */ = {
isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
name = NSURLRequest.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLRequest.h;
sourceTree = "<absolute>";
};
- 4322F4B911EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
- name = "CKEngine.h: 15";
- rLen = 97;
- rLoc = 181;
- rType = 0;
- vrLen = 394;
- vrLoc = 0;
- };
- 4322F4BA11EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */;
- name = "CKDictionarizerEngine.h: 19";
- rLen = 0;
- rLoc = 435;
- rType = 0;
- vrLen = 627;
- vrLoc = 0;
- };
- 4322F4BB11EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
- name = "CKJSONEngine.h: 17";
- rLen = 0;
- rLoc = 365;
- rType = 0;
- vrLen = 504;
- vrLoc = 0;
- };
- 4322F4BC11EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
- name = "CKOAuthEngine.h: 19";
- rLen = 0;
- rLoc = 344;
- rType = 0;
- vrLen = 727;
- vrLoc = 0;
- };
- 4322F4BD11EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
- name = "CKHTTPBasicAuthenticationEngine.h: 18";
- rLen = 0;
- rLoc = 434;
- rType = 0;
- vrLen = 656;
- vrLoc = 0;
- };
- 4322F4BF11EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
- name = "CKRoutesEngine.h: 18";
- rLen = 98;
- rLoc = 343;
- rType = 0;
- vrLen = 580;
- vrLoc = 0;
- };
- 4322F4C011EA78B800A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
- name = "CKRoutesEngine.m: 45";
- rLen = 99;
- rLoc = 1106;
- rType = 0;
- vrLen = 1096;
- vrLoc = 733;
- };
- 4322F4CB11EA791D00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
- name = "CKRequestOperation.h: 19";
- rLen = 0;
- rLoc = 398;
- rType = 0;
- vrLen = 821;
- vrLoc = 0;
- };
- 4322F50811EA7D3F00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
- name = "CKRequestOperation.m: 26";
- rLen = 0;
- rLoc = 675;
- rType = 0;
- vrLen = 1193;
- vrLoc = 1311;
- };
4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */;
name = "NSString+InflectionSupport.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 883;
vrLoc = 0;
};
- 4322F53911EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */;
- name = "NSString+InflectionSupport.h: 16";
- rLen = 0;
- rLoc = 307;
- rType = 0;
- vrLen = 781;
- vrLoc = 0;
- };
4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */;
name = "NSDictionary+CloudKitAdditions.h: 14";
rLen = 0;
rLoc = 296;
rType = 0;
vrLen = 334;
vrLoc = 0;
};
- 4322F56111EAFD0E00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
- name = "CKDictionarizerEngine.m: 105";
- rLen = 0;
- rLoc = 3461;
- rType = 0;
- vrLen = 838;
- vrLoc = 0;
- };
- 4322F56211EAFD0E00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 34";
- rLen = 0;
- rLoc = 1228;
- rType = 0;
- vrLen = 1302;
- vrLoc = 156;
- };
- 4322F56411EAFD3E00A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 19";
- rLen = 0;
- rLoc = 419;
- rType = 0;
- vrLen = 1308;
- vrLoc = 156;
- };
4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
name = "CKHTTPBasicAuthenticationEngine.h: 17";
rLen = 98;
rLoc = 336;
rType = 0;
vrLen = 656;
vrLoc = 0;
};
4322F5B011EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */;
name = "CKDictionarizerEngine.h: 19";
rLen = 133;
rLoc = 435;
rType = 0;
vrLen = 627;
vrLoc = 0;
};
4322F5B111EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
name = "CKHTTPBasicAuthenticationEngine.m: 41";
rLen = 134;
rLoc = 1029;
rType = 0;
vrLen = 988;
vrLoc = 296;
};
- 4322F5B211EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
- name = "CKDictionarizerEngine.m: 131";
- rLen = 0;
- rLoc = 4063;
- rType = 0;
- vrLen = 787;
- vrLoc = 3351;
- };
4322F5B311EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */;
name = "CKRequestDelegate.h: 17";
rLen = 0;
rLoc = 367;
rType = 0;
vrLen = 367;
vrLoc = 0;
};
4322F5B411EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
name = "CKEngine.h: 14";
rLen = 232;
rLoc = 180;
rType = 0;
vrLen = 418;
vrLoc = 0;
};
- 4322F5B511EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
- name = "CKOAuthEngine.m: 29";
- rLen = 0;
- rLoc = 625;
- rType = 0;
- vrLen = 719;
- vrLoc = 0;
- };
- 4322F5B611EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
- name = "CKOAuthEngine.h: 21";
- rLen = 0;
- rLoc = 410;
- rType = 0;
- vrLen = 833;
- vrLoc = 0;
- };
4322F5B711EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
name = "CKRoutesEngine.h: 18";
rLen = 98;
rLoc = 343;
rType = 0;
vrLen = 580;
vrLoc = 0;
};
4322F5B811EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
name = "CKRoutesEngine.m: 45";
rLen = 99;
rLoc = 1106;
rType = 0;
vrLen = 1037;
vrLoc = 733;
};
4322F5B911EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
name = "CKCloudKitManager.m: 11";
rLen = 0;
rLoc = 229;
rType = 0;
vrLen = 851;
vrLoc = 0;
};
- 4322F5BA11EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
- name = "CKRequestOperation.m: 92";
- rLen = 0;
- rLoc = 2699;
- rType = 0;
- vrLen = 1067;
- vrLoc = 41;
- };
- 4322F5BB11EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
- name = "CKRequestOperation.h: 13";
- rLen = 0;
- rLoc = 225;
- rType = 0;
- vrLen = 829;
- vrLoc = 0;
- };
- 4322F5BC11EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
- name = "CKJSONEngine.h: 17";
- rLen = 0;
- rLoc = 365;
- rType = 0;
- vrLen = 504;
- vrLoc = 0;
- };
- 4322F5BD11EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4322F5BE11EB004600A9CEF0 /* CJSONSerializer.h */;
- name = "CJSONSerializer.h: 42";
- rLen = 44;
- rLoc = 1763;
- rType = 0;
- vrLen = 1644;
- vrLoc = 213;
- };
- 4322F5BE11EB004600A9CEF0 /* CJSONSerializer.h */ = {
- isa = PBXFileReference;
- name = CJSONSerializer.h;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/JSON/CJSONSerializer.h";
- sourceTree = "<absolute>";
- };
- 4322F5BF11EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4322F5C011EB004600A9CEF0 /* CJSONDataSerializer.h */;
- name = "CJSONDataSerializer.h: 38";
- rLen = 42;
- rLoc = 1512;
- rType = 0;
- vrLen = 1405;
- vrLoc = 409;
- };
- 4322F5C011EB004600A9CEF0 /* CJSONDataSerializer.h */ = {
- isa = PBXFileReference;
- name = CJSONDataSerializer.h;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/JSON/CJSONDataSerializer.h";
- sourceTree = "<absolute>";
- };
- 4322F5C111EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 52";
- rLen = 0;
- rLoc = 1757;
- rType = 0;
- vrLen = 1331;
- vrLoc = 972;
- };
- 4322F5C211EB004600A9CEF0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */;
- name = "Base64Transcoder.c: 148";
- rLen = 0;
- rLoc = 6726;
- rType = 0;
- vrLen = 1330;
- vrLoc = 6128;
- };
- 4322F5C311EB004600A9CEF0 /* XCBuildMessageTextBookmark */ = {
- isa = PBXTextBookmark;
- comments = "Although the value stored to 'e' is used in the enclosing expression, the value is never actually read from 'e'";
- fRef = 4322F5C411EB004600A9CEF0 /* sha1.c */;
- fallbackIsa = XCBuildMessageTextBookmark;
- rLen = 1;
- rLoc = 99;
- rType = 1;
- };
- 4322F5C411EB004600A9CEF0 /* sha1.c */ = {
+ 4322F71311EB3BEF00A9CEF0 /* FBDialog.h */ = {
isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- name = sha1.c;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/sha1.c";
+ lastKnownFileType = sourcecode.c.h;
+ name = FBDialog.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBConnect/FBDialog.h";
sourceTree = "<absolute>";
};
- 4322F5C511EB004600A9CEF0 /* PBXTextBookmark */ = {
+ 4322F76511EB3E9000A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4322F5C611EB004600A9CEF0 /* sha1.c */;
- name = "sha1.c: 100";
+ fRef = 4322F71311EB3BEF00A9CEF0 /* FBDialog.h */;
+ name = "FBDialog.h: 15";
rLen = 0;
- rLoc = 3968;
+ rLoc = 588;
rType = 0;
- vrLen = 1122;
- vrLoc = 3315;
- };
- 4322F5C611EB004600A9CEF0 /* sha1.c */ = {
- isa = PBXFileReference;
- name = sha1.c;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/sha1.c";
- sourceTree = "<absolute>";
- };
- 432D5B4811E7154D000F86DD /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
- name = "CKHTTPBasicAuthenticationEngine.m: 35";
- rLen = 6;
- rLoc = 895;
- rType = 0;
- vrLen = 1127;
- vrLoc = 149;
+ vrLen = 1006;
+ vrLoc = 0;
};
435A08CD1191C14A00030F4C /* CKEngine.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
sepNavSelRange = "{180, 232}";
sepNavVisRange = "{0, 418}";
};
};
436F8B4111E463E900D37395 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */;
name = "CKRequestManager.m: 25";
rLen = 0;
rLoc = 508;
rType = 0;
vrLen = 899;
vrLoc = 0;
};
436F8DC011E4818800D37395 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */;
name = "CKRequestManager.h: 19";
rLen = 100;
rLoc = 305;
rType = 0;
vrLen = 412;
vrLoc = 0;
};
436F8DC111E4818800D37395 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */;
name = "CKCloudKitManager.h: 26";
rLen = 0;
rLoc = 736;
rType = 0;
vrLen = 901;
vrLoc = 0;
};
- 436F936311E4E8C700D37395 /* PBXTextBookmark */ = {
+ 4377A2C511EB42AB00D1909C /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
- name = "CKCloudKitManager.m: 52";
+ fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
+ name = "CKOAuthEngine.h: 7";
+ rLen = 0;
+ rLoc = 133;
+ rType = 0;
+ vrLen = 833;
+ vrLoc = 0;
+ };
+ 4377A2F011EB446300D1909C /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
+ name = "CKOAuthEngine.m: 21";
+ rLen = 0;
+ rLoc = 326;
+ rType = 0;
+ vrLen = 634;
+ vrLoc = 0;
+ };
+ 4377A2F111EB446300D1909C /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
+ name = "CKRequestOperation.h: 13";
rLen = 0;
- rLoc = 1358;
+ rLoc = 225;
rType = 0;
- vrLen = 2025;
- vrLoc = 257;
+ vrLen = 824;
+ vrLoc = 0;
+ };
+ 4377A2FF11EB47C800D1909C /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
+ name = "CKRequestOperation.m: 52";
+ rLen = 0;
+ rLoc = 1590;
+ rType = 0;
+ vrLen = 1199;
+ vrLoc = 1108;
+ };
+ 4377A3BC11EC677F00D1909C /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */;
+ name = "NSString+InflectionSupport.h: 16";
+ rLen = 0;
+ rLoc = 307;
+ rType = 0;
+ vrLen = 646;
+ vrLoc = 140;
};
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1251, 629}}";
sepNavSelRange = "{187, 0}";
sepNavVisRange = "{0, 188}";
};
};
438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
sepNavSelRange = "{435, 133}";
sepNavVisRange = "{0, 627}";
};
};
438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 1755}}";
- sepNavSelRange = "{4063, 0}";
- sepNavVisRange = "{3351, 787}";
- };
- };
- 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */;
- name = "Base64Transcoder.c: 148";
- rLen = 0;
- rLoc = 6726;
- rType = 0;
- vrLen = 1330;
- vrLoc = 6128;
- };
- 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- name = Base64Transcoder.c;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/Base64Transcoder.c";
- sourceTree = "<absolute>";
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1146, 2912}}";
- sepNavSelRange = "{6726, 0}";
- sepNavVisRange = "{6128, 1330}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1976}}";
+ sepNavSelRange = "{243, 0}";
+ sepNavVisRange = "{0, 680}";
};
};
438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 438E3A1811A58C1F0028F47F /* FBDialog.m */;
name = "FBDialog.m: 322";
rLen = 0;
rLoc = 11414;
rType = 0;
vrLen = 1860;
vrLoc = 10804;
};
438E3A1811A58C1F0028F47F /* FBDialog.m */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.objc;
name = FBDialog.m;
path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBDialog.m";
sourceTree = "<absolute>";
};
438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
sepNavSelRange = "{367, 0}";
sepNavVisRange = "{0, 367}";
};
};
- 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
- name = "CKOAuthEngine.m: 36";
- rLen = 0;
- rLoc = 741;
- rType = 0;
- vrLen = 544;
- vrLoc = 23;
- };
438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 438E3A9C11A599EE0028F47F /* FBRequest.h */;
name = "FBRequest.h: 134";
rLen = 70;
rLoc = 3444;
rType = 0;
vrLen = 852;
vrLoc = 3045;
};
438E3A9C11A599EE0028F47F /* FBRequest.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = FBRequest.h;
path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/src/FBConnect/FBRequest.h";
sourceTree = "<absolute>";
};
43A20C9F116DBEAB00BA930A /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
43A20CA0116DBEAB00BA930A /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 43A20EB6116DD04D00BA930A /* NSString.h */;
name = "NSString.h: 187";
rLen = 120;
rLoc = 9394;
rType = 0;
vrLen = 3358;
vrLoc = 7953;
};
43A20EB6116DD04D00BA930A /* NSString.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = NSString.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h;
sourceTree = "<absolute>";
};
+ 43FD6A5411EF3576005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
+ name = "CKDictionarizerEngine.m: 13";
+ rLen = 0;
+ rLoc = 243;
+ rType = 0;
+ vrLen = 680;
+ vrLoc = 0;
+ };
+ 43FD6AF811EF3A87005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
+ name = "CKJSONEngine.h: 17";
+ rLen = 0;
+ rLoc = 365;
+ rType = 0;
+ vrLen = 504;
+ vrLoc = 0;
+ };
+ 43FD6BA211EF4317005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
+ name = "CKJSONEngine.m: 44";
+ rLen = 0;
+ rLoc = 1471;
+ rType = 0;
+ vrLen = 1459;
+ vrLoc = 773;
+ };
+ 43FD6C1111F0414D005EE5A3 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
+ name = "CKJSONEngine.m: 44";
+ rLen = 0;
+ rLoc = 1471;
+ rType = 0;
+ vrLen = 1476;
+ vrLoc = 756;
+ };
D2AAC07D0554694100DB518D /* CloudKit */ = {
activeExec = 0;
};
}
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3 b/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
index b6c4740..2d8e2d1 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
+++ b/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
@@ -1,1213 +1,1289 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
- <array/>
+ <array>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict>
+ <key>PBXStatusErrorsKey</key>
+ <integer>0</integer>
+ </dict>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict>
+ <key>PBXStatusErrorsKey</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict>
+ <key>PBXStatusWarningsKey</key>
+ <integer>0</integer>
+ </dict>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict>
+ <key>PBXStatusWarningsKey</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>XCObserverAutoDisconnectKey</key>
+ <true/>
+ <key>XCObserverDefintionKey</key>
+ <dict>
+ <key>PBXStatusAnalyzerResultsKey</key>
+ <integer>0</integer>
+ </dict>
+ <key>XCObserverFactoryKey</key>
+ <string>XCPerspectivesSpecificationIdentifier</string>
+ <key>XCObserverGUIDKey</key>
+ <string>XCObserverProjectIdentifier</string>
+ <key>XCObserverNotificationKey</key>
+ <string>PBXStatusBuildStateMessageNotification</string>
+ <key>XCObserverTargetKey</key>
+ <string>XCMainBuildResultsModuleGUID</string>
+ <key>XCObserverTriggerKey</key>
+ <string>awakenModuleWithObserver:</string>
+ <key>XCObserverValidationKey</key>
+ <dict>
+ <key>PBXStatusAnalyzerResultsKey</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ </array>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
- <real>189</real>
+ <real>325</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>43053A2811A55962003C39C8</string>
<string>43A20CF0116DC0DA00BA930A</string>
<string>43A20CF1116DC0DA00BA930A</string>
<string>43A20CE0116DC0DA00BA930A</string>
<string>438E39B611A5831B0028F47F</string>
<string>43A20FD4116DD8F900BA930A</string>
<string>43A20DA1116DC5A400BA930A</string>
<string>43A2108A116DEB3900BA930A</string>
+ <string>431C7D6E11A402FA004F2B13</string>
<string>43A20DA2116DC5B000BA930A</string>
<string>43A20CE9116DC0DA00BA930A</string>
<string>43A2107F116DEB2000BA930A</string>
+ <string>43A20FE9116DDC3800BA930A</string>
<string>43A20CE5116DC0DA00BA930A</string>
<string>43A21086116DEB2B00BA930A</string>
+ <string>43A20D3C116DC1D700BA930A</string>
<string>43A20CE2116DC0DA00BA930A</string>
<string>435A08CC1191C13000030F4C</string>
<string>32C88DFF0371C24200C91783</string>
<string>0867D69AFE84028FC02AAC07</string>
<string>034768DFFF38A50411DB9C8B</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>0</integer>
+ <integer>58</integer>
+ <integer>57</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {211, 702}}</string>
+ <string>{{0, 265}, {347, 874}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {228, 720}}</string>
+ <string>{{0, 0}, {364, 892}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
- <real>189</real>
+ <real>325</real>
</array>
<key>RubberWindowFrame</key>
- <string>0 117 1440 761 0 0 1440 878 </string>
+ <string>0 95 1680 933 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
- <string>228pt</string>
+ <string>364pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>sha1.c</string>
+ <string>CKJSONEngine.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>sha1.c</string>
+ <string>CKJSONEngine.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>4322F5C511EB004600A9CEF0</string>
+ <string>43FD6C1111F0414D005EE5A3</string>
<key>history</key>
<array>
<string>43A20EB5116DD04D00BA930A</string>
<string>431C7F6011A4200A004F2B13</string>
<string>431C7F6211A4200A004F2B13</string>
<string>431C7F6311A4200A004F2B13</string>
<string>4305392211A5366B003C39C8</string>
<string>4305392311A5366B003C39C8</string>
<string>438E3A1711A58C1F0028F47F</string>
<string>438E3A9B11A599EE0028F47F</string>
<string>436F8B4111E463E900D37395</string>
<string>436F8DC011E4818800D37395</string>
<string>436F8DC111E4818800D37395</string>
<string>4322F40911EA6DE300A9CEF0</string>
<string>4322F44411EA6EC900A9CEF0</string>
<string>4322F49E11EA739B00A9CEF0</string>
<string>4322F53811EA7F5F00A9CEF0</string>
- <string>4322F53911EA7F5F00A9CEF0</string>
<string>4322F53A11EA7F5F00A9CEF0</string>
<string>4322F5AF11EB004600A9CEF0</string>
<string>4322F5B011EB004600A9CEF0</string>
<string>4322F5B111EB004600A9CEF0</string>
- <string>4322F5B211EB004600A9CEF0</string>
<string>4322F5B311EB004600A9CEF0</string>
<string>4322F5B411EB004600A9CEF0</string>
- <string>4322F5B511EB004600A9CEF0</string>
- <string>4322F5B611EB004600A9CEF0</string>
<string>4322F5B711EB004600A9CEF0</string>
<string>4322F5B811EB004600A9CEF0</string>
<string>4322F5B911EB004600A9CEF0</string>
- <string>4322F5BA11EB004600A9CEF0</string>
- <string>4322F5BB11EB004600A9CEF0</string>
- <string>4322F5BC11EB004600A9CEF0</string>
- <string>4322F5BD11EB004600A9CEF0</string>
- <string>4322F5BF11EB004600A9CEF0</string>
- <string>4322F5C111EB004600A9CEF0</string>
- <string>4322F5C211EB004600A9CEF0</string>
- <string>4322F5C311EB004600A9CEF0</string>
+ <string>4322F76511EB3E9000A9CEF0</string>
+ <string>4377A2C511EB42AB00D1909C</string>
+ <string>4377A2F011EB446300D1909C</string>
+ <string>4377A2F111EB446300D1909C</string>
+ <string>4377A2FF11EB47C800D1909C</string>
+ <string>4377A3BC11EC677F00D1909C</string>
+ <string>43FD6A5411EF3576005EE5A3</string>
+ <string>43FD6AF811EF3A87005EE5A3</string>
+ <string>43FD6BA211EF4317005EE5A3</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1207, 483}}</string>
+ <string>{{0, 0}, {1311, 518}}</string>
<key>RubberWindowFrame</key>
- <string>0 117 1440 761 0 0 1440 878 </string>
+ <string>0 95 1680 933 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>483pt</string>
+ <string>518pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>232pt</string>
+ <string>369pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1207, 205}}</string>
+ <string>{{10, 27}, {1311, 342}}</string>
+ <key>RubberWindowFrame</key>
+ <string>0 95 1680 933 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1409, 245}}</string>
+ <string>{{10, 27}, {1207, 311}}</string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1124, 223}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
- <integer>1021</integer>
+ <integer>1024</integer>
<key>XCBuildResultsTrigger_Open</key>
- <integer>1011</integer>
+ <integer>1013</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1207, 205}}</string>
- <key>RubberWindowFrame</key>
- <string>0 117 1440 761 0 0 1440 878 </string>
+ <string>{{10, 27}, {1207, 311}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
- <string>1207pt</string>
+ <string>1311pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
- <string>4322F5C711EB004600A9CEF0</string>
+ <string>43FD6C1211F0414D005EE5A3</string>
<string>1CA23ED40692098700951B8B</string>
- <string>4322F5C811EB004600A9CEF0</string>
+ <string>43FD6C1311F0414D005EE5A3</string>
<string>433104F70F1280740091B39C</string>
- <string>4322F5C911EB004600A9CEF0</string>
+ <string>43FD6C1411F0414D005EE5A3</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1440, 200}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>200pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {720, 256}}</string>
<string>{{720, 0}, {720, 256}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1440, 256}}</string>
<string>{{0, 256}, {1440, 259}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 205}, {1440, 515}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
<string>{{720, 0}, {720, 256}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>515pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
- <string>4322F52A11EA7F0C00A9CEF0</string>
+ <string>4377A30511EB47D400D1909C</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
- <string>4322F52B11EA7F0C00A9CEF0</string>
- <string>4322F52C11EA7F0C00A9CEF0</string>
- <string>4322F52D11EA7F0C00A9CEF0</string>
- <string>4322F52E11EA7F0C00A9CEF0</string>
+ <string>4377A30611EB47D400D1909C</string>
+ <string>4377A30711EB47D400D1909C</string>
+ <string>4377A30811EB47D400D1909C</string>
+ <string>4377A30911EB47D400D1909C</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>0.0</real>
+ <real>300958029.90329301</real>
<key>ToolbarDisplayMode</key>
- <integer>1</integer>
+ <integer>2</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/platform/iPhone/CloudKit.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>0 117 1440 761 0 0 1440 878 </string>
+ <string>0 95 1680 933 0 0 1680 1028 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.debuggerConsole</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAAC065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {700, 358}}</string>
<key>RubberWindowFrame</key>
<string>149 87 700 400 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Name</key>
<string>Debugger Console</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugCLIModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D5B069F1CE1000CFCEE</string>
<string>1C530D5C069F1CE1000CFCEE</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>149 87 440 400 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D5B069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.scm</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB2065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB3065D492600B07095</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {452, 0}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>0pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052920623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>SCM</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ConsoleFrame</key>
<string>{{0, 259}, {452, 0}}</string>
<key>Frame</key>
<string>{{0, 7}, {452, 259}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
<key>TableConfiguration</key>
<array>
<string>Status</string>
<real>30</real>
<string>FileName</string>
<real>199</real>
<string>Path</string>
<real>197.09500122070312</real>
</array>
<key>TableFrame</key>
<string>{{0, 0}, {452, 250}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Proportion</key>
<string>262pt</string>
</dict>
</array>
<key>Proportion</key>
<string>266pt</string>
</dict>
</array>
<key>Name</key>
<string>SCM</string>
<key>ServiceClasses</key>
<array>
<string>PBXCVSModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAB4065D492600B07095</string>
<string>1C78EAB5065D492600B07095</string>
<string>1C78EAB2065D492600B07095</string>
<string>1CD052920623707200166675</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.scmV3</string>
<key>WindowString</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CE0B1FE06471DED0097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>no</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>168</real>
diff --git a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj b/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
index 11d91f9..ca03ce0 100644
--- a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
+++ b/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
@@ -1,608 +1,611 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */; };
4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */; };
4317EFED1181DB510045FF78 /* CloudKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */; };
4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */; };
4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */; };
4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */; };
4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */; };
4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */; };
4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */; };
4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */; };
4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */; };
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */; };
4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */; };
4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */; };
4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */; };
4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */; };
4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */; };
4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */; };
4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */; };
4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */; };
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */; };
- 431C7DB411A40519004F2B13 /* libTouchJSON.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431C7D7611A402FA004F2B13 /* libTouchJSON.a */; };
431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */; };
431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */; };
- 432D5B6B11E7163E000F86DD /* libOAuthConsumer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */; };
+ 4322F74311EB3E4F00A9CEF0 /* libTouchJSON.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431C7D7611A402FA004F2B13 /* libTouchJSON.a */; };
435A08CE1191C14A00030F4C /* CKEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 435A08CD1191C14A00030F4C /* CKEngine.h */; };
+ 4377A26E11EB3EDE00D1909C /* libOAuthConsumer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */; };
4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */; };
438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */; };
438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */; };
438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE61A71B0DE2551300D4F7B9;
remoteInfo = FBPlatform;
};
4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = OAuthConsumer;
};
- 4317F12B1181E2320045FF78 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = D2AAC07D0554694100DB518D;
- remoteInfo = OAuthConsumer;
- };
431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = TouchJSON;
};
- 431C7DB511A40525004F2B13 /* PBXContainerItemProxy */ = {
+ 4322F73D11EB3E4600A9CEF0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = TouchJSON;
};
+ 4377A26F11EB3EEA00D1909C /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = D2AAC07D0554694100DB518D;
+ remoteInfo = OAuthConsumer;
+ };
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+CloudKitAdditions.h"; path = "../../src/NSMutableArray+CloudKitAdditions.h"; sourceTree = "<group>"; };
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+CloudKitAdditions.m"; path = "../../src/NSMutableArray+CloudKitAdditions.m"; sourceTree = "<group>"; };
43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = HTTPStatus.strings; path = ../../src/HTTPStatus.strings; sourceTree = "<group>"; };
4317EFEC1181DB510045FF78 /* CloudKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudKit.h; path = ../../src/CloudKit/CloudKit.h; sourceTree = SOURCE_ROOT; };
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKCloudKitManager.h; path = ../../src/CKCloudKitManager.h; sourceTree = SOURCE_ROOT; };
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKHTTPBasicAuthenticationEngine.h; path = ../../src/CKHTTPBasicAuthenticationEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKJSONEngine.h; path = ../../src/CKJSONEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKOAuthEngine.h; path = ../../src/CKOAuthEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestManager.h; path = ../../src/CKRequestManager.h; sourceTree = SOURCE_ROOT; };
4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestOperation.h; path = ../../src/CKRequestOperation.h; sourceTree = SOURCE_ROOT; };
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRoutesEngine.h; path = ../../src/CKRoutesEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+CloudKitAdditions.h"; path = "../../src/NSData+CloudKitAdditions.h"; sourceTree = SOURCE_ROOT; };
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+InflectionSupport.h"; path = "../../src/NSString+InflectionSupport.h"; sourceTree = SOURCE_ROOT; };
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKCloudKitManager.m; path = ../../src/CKCloudKitManager.m; sourceTree = SOURCE_ROOT; };
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKHTTPBasicAuthenticationEngine.m; path = ../../src/CKHTTPBasicAuthenticationEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKJSONEngine.m; path = ../../src/CKJSONEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKOAuthEngine.m; path = ../../src/CKOAuthEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestManager.m; path = ../../src/CKRequestManager.m; sourceTree = SOURCE_ROOT; };
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestOperation.m; path = ../../src/CKRequestOperation.m; sourceTree = SOURCE_ROOT; };
4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRoutesEngine.m; path = ../../src/CKRoutesEngine.m; sourceTree = SOURCE_ROOT; };
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+CloudKitAdditions.m"; path = "../../src/NSData+CloudKitAdditions.m"; sourceTree = SOURCE_ROOT; };
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+InflectionSupport.m"; path = "../../src/NSString+InflectionSupport.m"; sourceTree = SOURCE_ROOT; };
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TouchJSON.xcodeproj; path = "../../lib/touchjson-objc/src/TouchJSON.xcodeproj"; sourceTree = SOURCE_ROOT; };
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CloudKitAdditions.h"; path = "../../src/NSDictionary+CloudKitAdditions.h"; sourceTree = "<group>"; };
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CloudKitAdditions.m"; path = "../../src/NSDictionary+CloudKitAdditions.m"; sourceTree = "<group>"; };
435A08CD1191C14A00030F4C /* CKEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKEngine.h; path = ../../src/CKEngine.h; sourceTree = "<group>"; };
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloudKit_Prefix.pch; sourceTree = "<group>"; };
438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKDictionarizerEngine.h; path = ../../src/CKDictionarizerEngine.h; sourceTree = "<group>"; };
438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKDictionarizerEngine.m; path = ../../src/CKDictionarizerEngine.m; sourceTree = "<group>"; };
438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestDelegate.h; path = ../../src/CKRequestDelegate.h; sourceTree = "<group>"; };
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OAuthConsumer.xcodeproj; path = "../../lib/oauth-objc/platform/iPhone/OAuthConsumer.xcodeproj"; sourceTree = SOURCE_ROOT; };
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FBConnect.xcodeproj; path = "../../lib/fbconnect-objc/platform/iPhone/FBConnect.xcodeproj"; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libCloudKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCloudKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
- 431C7DB411A40519004F2B13 /* libTouchJSON.a in Frameworks */,
- 432D5B6B11E7163E000F86DD /* libOAuthConsumer.a in Frameworks */,
+ 4322F74311EB3E4F00A9CEF0 /* libTouchJSON.a in Frameworks */,
+ 4377A26E11EB3EDE00D1909C /* libOAuthConsumer.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libCloudKit.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* CloudKit */ = {
isa = PBXGroup;
children = (
4317EFEC1181DB510045FF78 /* CloudKit.h */,
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
43053A1111A55398003C39C8 /* HTTPStatus.strings */,
);
name = CloudKit;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
43053A2811A55962003C39C8 /* Core */,
43A20CF0116DC0DA00BA930A /* Utils */,
43A20CE0116DC0DA00BA930A /* Engines */,
435A08CC1191C13000030F4C /* Route engines */,
438E3A6A11A595740028F47F /* CKRequestDelegate.h */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
43053A2811A55962003C39C8 /* Core */ = {
isa = PBXGroup;
children = (
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */,
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */,
4317EFF41181DB850045FF78 /* CKRequestManager.h */,
4317EFFE1181DB850045FF78 /* CKRequestManager.m */,
4317EFF51181DB850045FF78 /* CKRequestOperation.h */,
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */,
);
name = Core;
sourceTree = "<group>";
};
4317F0E51181E0B80045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0E91181E0B80045FF78 /* libFBPlatform.a */,
);
name = Products;
sourceTree = "<group>";
};
4317F0ED1181E0C70045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */,
);
name = Products;
sourceTree = "<group>";
};
431C7D6F11A402FA004F2B13 /* Products */ = {
isa = PBXGroup;
children = (
431C7D7611A402FA004F2B13 /* libTouchJSON.a */,
);
name = Products;
sourceTree = "<group>";
};
435A08CC1191C13000030F4C /* Route engines */ = {
isa = PBXGroup;
children = (
435A08CD1191C14A00030F4C /* CKEngine.h */,
);
name = "Route engines";
sourceTree = "<group>";
};
438E39B611A5831B0028F47F /* Dictionarizer */ = {
isa = PBXGroup;
children = (
438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */,
438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */,
);
name = Dictionarizer;
sourceTree = "<group>";
};
43A20CE0116DC0DA00BA930A /* Engines */ = {
isa = PBXGroup;
children = (
438E39B611A5831B0028F47F /* Dictionarizer */,
43A20FD4116DD8F900BA930A /* Routes */,
43A20DA1116DC5A400BA930A /* JSON */,
43A20DA2116DC5B000BA930A /* XML */,
43A20CE9116DC0DA00BA930A /* FBConnect */,
43A20CE5116DC0DA00BA930A /* OAuth */,
43A20CE2116DC0DA00BA930A /* HTTP Basic */,
);
name = Engines;
sourceTree = "<group>";
};
43A20CE2116DC0DA00BA930A /* HTTP Basic */ = {
isa = PBXGroup;
children = (
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */,
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */,
);
name = "HTTP Basic";
sourceTree = "<group>";
};
43A20CE5116DC0DA00BA930A /* OAuth */ = {
isa = PBXGroup;
children = (
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */,
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */,
43A21086116DEB2B00BA930A /* Library */,
);
name = OAuth;
sourceTree = "<group>";
};
43A20CE9116DC0DA00BA930A /* FBConnect */ = {
isa = PBXGroup;
children = (
43A2107F116DEB2000BA930A /* Library */,
);
name = FBConnect;
sourceTree = "<group>";
};
43A20CF0116DC0DA00BA930A /* Utils */ = {
isa = PBXGroup;
children = (
43A20CF1116DC0DA00BA930A /* Extensions */,
);
name = Utils;
sourceTree = "<group>";
};
43A20CF1116DC0DA00BA930A /* Extensions */ = {
isa = PBXGroup;
children = (
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */,
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */,
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */,
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */,
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */,
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */,
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */,
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */,
);
name = Extensions;
sourceTree = "<group>";
};
43A20DA1116DC5A400BA930A /* JSON */ = {
isa = PBXGroup;
children = (
4317EFF21181DB850045FF78 /* CKJSONEngine.h */,
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */,
43A2108A116DEB3900BA930A /* Library */,
);
name = JSON;
sourceTree = "<group>";
};
43A20DA2116DC5B000BA930A /* XML */ = {
isa = PBXGroup;
children = (
);
name = XML;
sourceTree = "<group>";
};
43A20FD4116DD8F900BA930A /* Routes */ = {
isa = PBXGroup;
children = (
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */,
4317F0001181DB850045FF78 /* CKRoutesEngine.m */,
);
name = Routes;
sourceTree = "<group>";
};
43A2107F116DEB2000BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A21086116DEB2B00BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A2108A116DEB3900BA930A /* Library */ = {
isa = PBXGroup;
children = (
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */,
4317EFED1181DB510045FF78 /* CloudKit.h in Headers */,
4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */,
4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */,
4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */,
4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */,
4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */,
4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */,
4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */,
4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */,
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */,
435A08CE1191C14A00030F4C /* CKEngine.h in Headers */,
431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */,
4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */,
438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */,
438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* CloudKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
- 4317F12C1181E2320045FF78 /* PBXTargetDependency */,
- 431C7DB611A40525004F2B13 /* PBXTargetDependency */,
+ 4322F73E11EB3E4600A9CEF0 /* PBXTargetDependency */,
+ 4377A27011EB3EEA00D1909C /* PBXTargetDependency */,
);
name = CloudKit;
productName = CloudKit;
productReference = D2AAC07E0554694100DB518D /* libCloudKit.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
ORGANIZATIONNAME = scrumers;
};
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* CloudKit */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 4317F0E51181E0B80045FF78 /* Products */;
ProjectRef = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
},
{
ProductGroup = 4317F0ED1181E0C70045FF78 /* Products */;
ProjectRef = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
},
{
ProductGroup = 431C7D6F11A402FA004F2B13 /* Products */;
ProjectRef = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
},
);
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* CloudKit */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
4317F0E91181E0B80045FF78 /* libFBPlatform.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libFBPlatform.a;
remoteRef = 4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libOAuthConsumer.a;
remoteRef = 4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431C7D7611A402FA004F2B13 /* libTouchJSON.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libTouchJSON.a;
remoteRef = 431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */,
4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */,
4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */,
4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */,
4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */,
4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */,
4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */,
4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */,
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */,
431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */,
4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */,
438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- 4317F12C1181E2320045FF78 /* PBXTargetDependency */ = {
+ 4322F73E11EB3E4600A9CEF0 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- name = OAuthConsumer;
- targetProxy = 4317F12B1181E2320045FF78 /* PBXContainerItemProxy */;
+ name = TouchJSON;
+ targetProxy = 4322F73D11EB3E4600A9CEF0 /* PBXContainerItemProxy */;
};
- 431C7DB611A40525004F2B13 /* PBXTargetDependency */ = {
+ 4377A27011EB3EEA00D1909C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- name = TouchJSON;
- targetProxy = 431C7DB511A40525004F2B13 /* PBXContainerItemProxy */;
+ name = OAuthConsumer;
+ targetProxy = 4377A26F11EB3EEA00D1909C /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ ARCHS = armv6;
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/CloudKit.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
+ HEADER_SEARCH_PATHS = (
+ "../../lib/touchjson-objc/src//**",
+ "../../lib/oauth-objc/src//**",
+ );
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = CloudKit;
+ VALID_ARCHS = armv6;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ ARCHS = armv6;
DSTROOT = /tmp/CloudKit.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
+ HEADER_SEARCH_PATHS = (
+ "../../lib/touchjson-objc/src//**",
+ "../../lib/oauth-objc/src//**",
+ );
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = CloudKit;
+ VALID_ARCHS = armv6;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "./../../lib/touchjson-objc/src//**",
- "./../../lib/oauth-objc/src//**",
- "./../../lib/fbconnect-objc/src//**",
- );
- OTHER_LDFLAGS = (
- "-ObjC",
- "-all_load",
- );
+ HEADER_SEARCH_PATHS = "";
+ OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- OTHER_LDFLAGS = (
- "-ObjC",
- "-all_load",
- );
+ HEADER_SEARCH_PATHS = "";
+ OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
diff --git a/src/CKDictionarizerEngine.m b/src/CKDictionarizerEngine.m
index f5420cc..5e429a3 100644
--- a/src/CKDictionarizerEngine.m
+++ b/src/CKDictionarizerEngine.m
@@ -1,139 +1,143 @@
//
// CKDictionarizerEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import "CKDictionarizerEngine.h"
#import "objc/runtime.h"
#import "NSString+InflectionSupport.h"
@interface CKDictionarizerEngine (Private)
- (NSString *)localClassnameFor:(NSString *)classname;
- (NSString *)remoteClassnameFor:(NSString *)classname;
- (id)objectFromDictionary:(NSDictionary *)dictionary;
- (NSArray *)objectsFromDictionaries:(NSArray *)array;
- (NSDictionary *)dictionaryFromObject:(id)object;
- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects;
@end
@implementation CKDictionarizerEngine
@synthesize
localPrefix= _localPrefix;
- (id)initWithLocalPrefix:(NSString *)localPrefix {
self = [super init];
if (self != nil) {
self.localPrefix= localPrefix;
}
return self;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
id rawBody= [*params valueForKey:@"HTTPBody"];
if (rawBody != nil) {
NSDictionary *processedBody;
if ([rawBody isKindOfClass:[NSArray class]]) {
processedBody= [self dictionaryFromObjects:rawBody];
} else {
processedBody= [self dictionaryFromObject:rawBody];
}
[*params setValue:processedBody forKey:@"HTTPBody"];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error; {
if (*data != nil) {
if ([*data isKindOfClass:[NSArray class]]) {
*data= [self objectsFromDictionaries:*data];
} else {
*data= [self objectFromDictionary:*data];
}
}
}
- (id)objectFromDictionary:(NSDictionary *)dictionary {
id remoteObject, localObject;
NSString *remoteClassname, *localClassname;
remoteClassname= [[dictionary allKeys] lastObject];
remoteObject= [dictionary valueForKey:remoteClassname];
localClassname= [self localClassnameFor:remoteClassname];
localObject= [[NSClassFromString(localClassname) alloc] init];
for (id remoteAttribute in [remoteObject allKeys]) {
NSString *localAttribute= [[NSString stringWithFormat:@"set_%@:", remoteAttribute] camelize];
if ([localObject respondsToSelector:NSSelectorFromString(localAttribute)]) {
[localObject performSelector:NSSelectorFromString(localAttribute)
withObject:[remoteObject valueForKey:remoteAttribute]];
}
}
return localObject;
}
- (NSArray *)objectsFromDictionaries:(NSArray *)array {
NSMutableArray *objects= [NSMutableArray array];
for (id object in array) {
[objects addObject:[self objectFromDictionary:object]];
}
return objects;
}
- (NSDictionary *)dictionaryFromObject:(id)object {
NSMutableDictionary *dict= nil;
if ([object respondsToSelector:@selector(toDictionary)]) {
dict= [object performSelector:@selector(toDictionary)];
} else {
dict = [NSMutableDictionary dictionary];
unsigned int outCount;
objc_property_t *propList = class_copyPropertyList([object class], &outCount);
NSString *propertyName;
for (int i = 0; i < outCount; i++) {
objc_property_t * prop = propList + i;
propertyName = [NSString stringWithCString:property_getName(*prop) encoding:NSUTF8StringEncoding];
if ([object respondsToSelector:NSSelectorFromString(propertyName)]) {
//NSString *type = [NSString stringWithCString:property_getAttributes(*prop) encoding:NSUTF8StringEncoding];
[dict setValue:[object performSelector:NSSelectorFromString(propertyName)] forKey:[propertyName underscore]];
}
}
free(propList);
}
- NSLog(@"%@", dict);
- return dict;
+ return [NSDictionary dictionaryWithObject:dict
+ forKey:[self remoteClassnameFor:NSStringFromClass([object class])]];
}
- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects {
return nil;
}
- (NSString *)localClassnameFor:(NSString *)classname {
NSString *result = [classname camelize];
result = [result stringByReplacingCharactersInRange:NSMakeRange(0,1)
withString:[[result substringWithRange:NSMakeRange(0,1)] uppercaseString]];
if (self.localPrefix!=nil) {
result = [self.localPrefix stringByAppendingString:result];
}
return result;
}
- (NSString *)remoteClassnameFor:(NSString *)classname {
-
- return nil;
+ NSString *result= classname;
+ if (self.localPrefix!=nil) {
+ result= [result substringFromIndex:[self.localPrefix length]];
+ }
+ result = [result lowercaseString];
+ return result;
}
- (void) dealloc {
[_localPrefix release];
[super dealloc];
}
@end
diff --git a/src/CKJSONEngine.m b/src/CKJSONEngine.m
index 69ce87c..58b2efc 100644
--- a/src/CKJSONEngine.m
+++ b/src/CKJSONEngine.m
@@ -1,67 +1,66 @@
//
// CKJSONEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import "CKJSONEngine.h"
#import "TouchJSON/TouchJSON.h"
@interface CKJSONEngine (Private)
- (NSString *)serializeObject:(id)inObject;
- (NSString *)serializeArray:(NSArray *)inArray;
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary;
- (id)deserialize:(NSData *)inData error:(NSError **)outError;
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError;
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError;
@end
@implementation CKJSONEngine
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
NSString *path;
path= [[[*request URL] absoluteString] stringByAppendingString:@".json"];
[*request setURL:[NSURL URLWithString:path]];
[*request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
- [*request addValue:@"application/json" forHTTPHeaderField:@"Accept"];
if ([*params valueForKey:@"HTTPBody"] != nil) {
[*request setHTTPBody:(NSData *)[[self serializeDictionary:[*params valueForKey:@"HTTPBody"]] dataUsingEncoding:NSUTF8StringEncoding]];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
*data= [self deserialize:*data error:error];
}
- (NSString *)serializeObject:(id)inObject {
return (NSString *)[[CJSONSerializer serializer] serializeObject:inObject];
}
- (NSString *)serializeArray:(NSArray *)inArray {
return (NSString *)[[CJSONSerializer serializer] serializeArray:inArray];
}
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary {
return (NSString *)[[CJSONSerializer serializer] serializeDictionary:inDictionary];
}
- (id)deserialize:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserialize:inData error:outError];
}
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsDictionary:inData error:outError];
}
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsArray:inData error:outError];
}
@end
diff --git a/src/CKOAuthEngine.m b/src/CKOAuthEngine.m
index 950dea6..d94141e 100644
--- a/src/CKOAuthEngine.m
+++ b/src/CKOAuthEngine.m
@@ -1,40 +1,39 @@
//
// CKOAuthEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import "CKOAuthEngine.h"
#import "OAuthConsumer/OAuthConsumer.h"
-#import "FBConnect/FBConnect.h"
@implementation CKOAuthEngine
@synthesize
token = _token;
@synthesize
consumer = _consumer;
@synthesize
signatureProvider = _signatureProvider;
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (void) dealloc {
[_token release];
[_consumer release];
[_signatureProvider release];
[super dealloc];
}
@end
diff --git a/src/CKRequestOperation.m b/src/CKRequestOperation.m
index ad6803b..1dba152 100644
--- a/src/CKRequestOperation.m
+++ b/src/CKRequestOperation.m
@@ -1,97 +1,97 @@
//
// CKRequestOperation.m
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import "CKRequestOperation.h"
#import "CKCloudKitManager.h"
#import "CKRequestDelegate.h"
#import "CKEngine.h"
@implementation CKRequestOperation
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andConfiguration:(CKCloudKitManager *)inConfiguration {
self = [super init];
if (self != nil) {
request = [inRequest retain];
delegate = [inDelegate retain];
configuration= [inConfiguration retain];
params= [[NSMutableDictionary alloc] initWithDictionary:inParams];
}
return self;
}
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andConfiguration:(CKCloudKitManager *)inConfiguration {
CKRequestOperation *operation;
operation = [[CKRequestOperation alloc] initWithRequest:inRequest
params:inParams
delegate:inDelegate
andConfiguration:inConfiguration];
return [operation autorelease];
}
- (void)main {
NSError *error = nil;
NSArray *ordered_engines= [configuration ordered_engines];
for (id engine_name in ordered_engines) {
id<CKEngine> engine= [configuration engineForKey:engine_name];
[engine processRequest:&request withParams:¶ms];
}
NSLog(@"%@", [request URL]);
- NSLog(@"%@", [request HTTPBody]);
+ NSLog(@"%@", [[NSString alloc] initWithData:[request HTTPBody] encoding:NSUTF8StringEncoding]);
NSHTTPURLResponse * response;
id rawData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
if (response.statusCode < 400 && error == nil) {
for (int index= [ordered_engines count]-1; index >= 0; index--) {
id<CKEngine> engine= [configuration engineForKey:[ordered_engines objectAtIndex:index]];
[engine processResponse:&response
withParams:params
data:&rawData
andError:&error];
}
} else if (response.statusCode > 400) {
//errors handling
}
if (error == nil) {
[self performSelectorOnMainThread:@selector(requestDidSucceedWithData:)
withObject:rawData
waitUntilDone:YES];
} else {
[self performSelectorOnMainThread:@selector(requestDidFailWithError:)
withObject:error
waitUntilDone:YES];
}
}
- (void)requestDidFailWithError:(NSError *)error {
[delegate request:request didFailWithError:error];
}
- (void)requestDidSucceedWithData:(id)response {
[delegate request:request didSucceedWithData:response];
}
- (void)dealloc {
[data release];
[request release];
[delegate release];
[super dealloc];
}
@end
|
scrumers/CoreCloud
|
7a0b6104eb55b8408550ae2e0ee24f2b5c8c8743
|
Stabilisation
|
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
index 946a324..3d0171b 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
@@ -1,427 +1,452 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
activeBuildConfigurationName = Debug;
activeTarget = D2AAC07D0554694100DB518D /* TouchJSON */;
addToTargets = (
D2AAC07D0554694100DB518D /* TouchJSON */,
);
codeSenseManager = 431C7D3511A4025F004F2B13 /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 10,
+ 916,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 296059609;
- PBXWorkspaceStateSaveDate = 296059609;
+ PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+ PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+ PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+ PBXFileTableDataSourceColumnWidthsKey = (
+ 20,
+ 876,
+ 60,
+ 20,
+ 48,
+ 43,
+ 43,
+ );
+ PBXFileTableDataSourceColumnsKey = (
+ PBXFileDataSource_FiletypeID,
+ PBXFileDataSource_Filename_ColumnID,
+ PBXTargetDataSource_PrimaryAttribute,
+ PBXFileDataSource_Built_ColumnID,
+ PBXFileDataSource_ObjectSize_ColumnID,
+ PBXFileDataSource_Errors_ColumnID,
+ PBXFileDataSource_Warnings_ColumnID,
+ );
+ };
+ PBXPerProjectTemplateStateSaveDate = 300579588;
+ PBXWorkspaceStateSaveDate = 300579588;
};
perUserProjectItems = {
- 431C7D8711A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8711A4042B004F2B13 /* PBXTextBookmark */;
431C7D8811A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8811A4042B004F2B13 /* PBXTextBookmark */;
431C7D8911A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8911A4042B004F2B13 /* PBXTextBookmark */;
431C7D8C11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8C11A4042B004F2B13 /* PBXTextBookmark */;
- 431C7D8D11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8D11A4042B004F2B13 /* PBXTextBookmark */;
431C7D8E11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8E11A4042B004F2B13 /* PBXTextBookmark */;
431C7D9011A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9011A4042B004F2B13 /* PBXTextBookmark */;
431C7D9111A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9111A4042B004F2B13 /* PBXTextBookmark */;
431C7D9211A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9211A4042B004F2B13 /* PBXTextBookmark */;
431C7D9311A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9311A4042B004F2B13 /* PBXTextBookmark */;
431C7D9411A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9411A4042B004F2B13 /* PBXTextBookmark */;
431C7D9511A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9511A4042B004F2B13 /* PBXTextBookmark */;
431C7D9611A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9611A4042B004F2B13 /* PBXTextBookmark */;
431C7D9711A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9711A4042B004F2B13 /* PBXTextBookmark */;
431C7D9811A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9811A4042B004F2B13 /* PBXTextBookmark */;
431C7D9911A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9911A4042B004F2B13 /* PBXTextBookmark */;
431C7DC711A405A8004F2B13 /* PBXTextBookmark */ = 431C7DC711A405A8004F2B13 /* PBXTextBookmark */;
+ 4322F50A11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50A11EA7D4500A9CEF0 /* PBXTextBookmark */;
+ 4322F50B11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50B11EA7D4500A9CEF0 /* PBXTextBookmark */;
+ 4322F50C11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50C11EA7D4500A9CEF0 /* PBXTextBookmark */;
+ 4322F50D11EA7D4500A9CEF0 /* PBXTextBookmark */ = 4322F50D11EA7D4500A9CEF0 /* PBXTextBookmark */;
438E39CB11A5864B0028F47F /* PBXTextBookmark */ = 438E39CB11A5864B0028F47F /* PBXTextBookmark */;
438E39CC11A5864B0028F47F /* PBXTextBookmark */ = 438E39CC11A5864B0028F47F /* PBXTextBookmark */;
- 438E39CD11A5864B0028F47F /* PBXTextBookmark */ = 438E39CD11A5864B0028F47F /* PBXTextBookmark */;
- 438E39CE11A5864B0028F47F /* PBXTextBookmark */ = 438E39CE11A5864B0028F47F /* PBXTextBookmark */;
};
sourceControlManager = 431C7D3411A4025F004F2B13 /* Source Control */;
userBuildSettings = {
};
};
431C7D3411A4025F004F2B13 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
431C7D3511A4025F004F2B13 /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
431C7D4111A402BC004F2B13 /* CDataScanner.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 884}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 897}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 1860}";
+ sepNavVisRange = "{1333, 1062}";
};
};
431C7D4211A402BC004F2B13 /* CDataScanner.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 3198}}";
sepNavSelRange = "{1247, 61}";
sepNavVisRange = "{0, 1760}";
};
};
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1453}";
};
};
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1053}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{1220, 1320}";
};
};
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1402}";
};
};
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1132, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1841}";
};
};
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1432}";
};
};
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1555}";
};
};
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{759, 0}";
sepNavVisRange = "{0, 1622}";
};
};
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1417}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1836}";
};
};
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1814}";
};
};
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 3016}}";
sepNavSelRange = "{2802, 19}";
sepNavVisRange = "{1967, 908}";
};
};
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 598}}";
sepNavSelRange = "{1394, 17}";
sepNavVisRange = "{0, 1428}";
};
};
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1170}}";
sepNavSelRange = "{1254, 80}";
sepNavVisRange = "{0, 1910}";
};
};
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1566, 709}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1566, 624}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 1927}";
+ sepNavVisRange = "{537, 1390}";
};
};
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1027}}";
sepNavSelRange = "{1252, 60}";
sepNavVisRange = "{0, 1612}";
};
};
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 533}}";
- sepNavSelRange = "{765, 0}";
+ sepNavSelRange = "{780, 0}";
sepNavVisRange = "{89, 1360}";
};
};
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 715}}";
sepNavSelRange = "{1254, 32}";
sepNavVisRange = "{0, 1531}";
};
};
431C7D8211A4037C004F2B13 /* TouchJSON.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{369, 0}";
sepNavVisRange = "{0, 369}";
};
};
- 431C7D8711A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
- name = "CDataScanner.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1860;
- vrLoc = 0;
- };
431C7D8811A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4211A402BC004F2B13 /* CDataScanner.m */;
name = "CDataScanner.m: 30";
rLen = 61;
rLoc = 1247;
rType = 0;
vrLen = 1760;
vrLoc = 0;
};
431C7D8911A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */;
name = "CJSONDataSerializer.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1814;
vrLoc = 0;
};
431C7D8C11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */;
name = "CJSONDeserializer.m: 30";
rLen = 80;
rLoc = 1254;
rType = 0;
vrLen = 1910;
vrLoc = 0;
};
- 431C7D8D11A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D5311A402BC004F2B13 /* CJSONSerializer.h */;
- name = "CJSONSerializer.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1927;
- vrLoc = 0;
- };
431C7D8E11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5411A402BC004F2B13 /* CJSONSerializer.m */;
name = "CJSONSerializer.m: 30";
rLen = 60;
rLoc = 1252;
rType = 0;
vrLen = 1612;
vrLoc = 0;
};
431C7D9011A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */;
name = "CSerializedJSONData.m: 30";
rLen = 32;
rLoc = 1254;
rType = 0;
vrLen = 1531;
vrLoc = 0;
};
431C7D9111A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */;
name = "TouchJSON_Prefix.pch: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 188;
vrLoc = 0;
};
431C7D9211A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */;
name = "TouchJSON.h: 17";
rLen = 0;
rLoc = 369;
rType = 0;
vrLen = 369;
vrLoc = 0;
};
431C7D9311A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */;
name = "CDataScanner_Extensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1453;
vrLoc = 0;
};
431C7D9411A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */;
name = "CDataScanner_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1320;
vrLoc = 1220;
};
431C7D9511A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */;
name = "NSCharacterSet_Extensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1402;
vrLoc = 0;
};
431C7D9611A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */;
name = "NSCharacterSet_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1841;
vrLoc = 0;
};
431C7D9711A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */;
name = "NSDictionary_JSONExtensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1432;
vrLoc = 0;
};
431C7D9811A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */;
name = "NSDictionary_JSONExtensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1555;
vrLoc = 0;
};
431C7D9911A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */;
name = "NSScanner_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1836;
vrLoc = 0;
};
431C7DC711A405A8004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */;
name = "NSScanner_Extensions.h: 19";
rLen = 0;
rLoc = 759;
rType = 0;
vrLen = 1622;
vrLoc = 0;
};
+ 4322F50A11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
+ name = "CSerializedJSONData.h: 20";
+ rLen = 0;
+ rLoc = 780;
+ rType = 0;
+ vrLen = 1360;
+ vrLoc = 89;
+ };
+ 4322F50B11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D5311A402BC004F2B13 /* CJSONSerializer.h */;
+ name = "CJSONSerializer.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1390;
+ vrLoc = 537;
+ };
+ 4322F50C11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
+ name = "CDataScanner.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1348;
+ vrLoc = 0;
+ };
+ 4322F50D11EA7D4500A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
+ name = "CDataScanner.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 1062;
+ vrLoc = 1333;
+ };
438E39CB11A5864B0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */;
name = "CJSONDeserializer.h: 34";
rLen = 17;
rLoc = 1394;
rType = 0;
vrLen = 1428;
vrLoc = 0;
};
438E39CC11A5864B0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */;
name = "CJSONDataSerializer.m: 91";
rLen = 19;
rLoc = 2802;
rType = 0;
vrLen = 908;
vrLoc = 1967;
};
- 438E39CD11A5864B0028F47F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
- rLen = 19;
- rLoc = 1300;
- rType = 0;
- };
- 438E39CE11A5864B0028F47F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
- name = "CSerializedJSONData.h: 20";
- rLen = 0;
- rLoc = 765;
- rType = 0;
- vrLen = 1360;
- vrLoc = 89;
- };
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 188}";
};
};
D2AAC07D0554694100DB518D /* TouchJSON */ = {
activeExec = 0;
};
}
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3 b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
index 1b64653..ab5102d 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
@@ -1,998 +1,997 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
<array/>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
<real>241</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>431C7D4311A402BC004F2B13</string>
<string>431C7D4C11A402BC004F2B13</string>
<string>32C88DFF0371C24200C91783</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>16</integer>
- <integer>13</integer>
+ <integer>2</integer>
<integer>1</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 0}, {263, 691}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {280, 709}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
<real>241</real>
</array>
<key>RubberWindowFrame</key>
<string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
<string>280pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CSerializedJSONData.h</string>
+ <string>CDataScanner.h</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CSerializedJSONData.h</string>
+ <string>CDataScanner.h</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>438E39CE11A5864B0028F47F</string>
+ <string>4322F50D11EA7D4500A9CEF0</string>
<key>history</key>
<array>
- <string>431C7D8711A4042B004F2B13</string>
<string>431C7D8811A4042B004F2B13</string>
<string>431C7D8911A4042B004F2B13</string>
<string>431C7D8C11A4042B004F2B13</string>
- <string>431C7D8D11A4042B004F2B13</string>
<string>431C7D8E11A4042B004F2B13</string>
<string>431C7D9011A4042B004F2B13</string>
<string>431C7D9111A4042B004F2B13</string>
<string>431C7D9211A4042B004F2B13</string>
<string>431C7D9311A4042B004F2B13</string>
<string>431C7D9411A4042B004F2B13</string>
<string>431C7D9511A4042B004F2B13</string>
<string>431C7D9611A4042B004F2B13</string>
<string>431C7D9711A4042B004F2B13</string>
<string>431C7D9811A4042B004F2B13</string>
<string>431C7D9911A4042B004F2B13</string>
<string>431C7DC711A405A8004F2B13</string>
<string>438E39CB11A5864B0028F47F</string>
<string>438E39CC11A5864B0028F47F</string>
- <string>438E39CD11A5864B0028F47F</string>
+ <string>4322F50A11EA7D4500A9CEF0</string>
+ <string>4322F50B11EA7D4500A9CEF0</string>
+ <string>4322F50C11EA7D4500A9CEF0</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1155, 493}}</string>
+ <string>{{0, 0}, {1155, 481}}</string>
<key>RubberWindowFrame</key>
<string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>493pt</string>
+ <string>481pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>211pt</string>
+ <string>223pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1155, -27}}</string>
+ <string>{{10, 27}, {1155, 196}}</string>
+ <key>RubberWindowFrame</key>
+ <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1155, 184}}</string>
- <key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 31}, {603, 297}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
<integer>1021</integer>
<key>XCBuildResultsTrigger_Open</key>
<integer>1011</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1155, 205}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
<string>1155pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
- <string>438E39CF11A5864B0028F47F</string>
+ <string>4322F50E11EA7D4500A9CEF0</string>
<string>1CA23ED40692098700951B8B</string>
- <string>438E39D011A5864B0028F47F</string>
+ <string>4322F50F11EA7D4500A9CEF0</string>
<string>433104F70F1280740091B39C</string>
- <string>438E39D111A5864B0028F47F</string>
+ <string>4322F51011EA7D4500A9CEF0</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.ide.XCBreakpointsToolbarItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1440, 218}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {720, 252}}</string>
<string>{{720, 0}, {720, 252}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1440, 252}}</string>
<string>{{0, 252}, {1440, 253}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 223}, {1440, 505}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
<string>{{720, 0}, {720, 252}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>505pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
<string>436AD84810306A210068D6C9</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
<string>436AD84910306A210068D6C9</string>
<string>436AD84A10306A210068D6C9</string>
<string>436AD84B10306A210068D6C9</string>
<string>436AD84C10306A210068D6C9</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
<real>0.0</real>
<key>ToolbarDisplayMode</key>
<integer>1</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/TouchJSON.xcodeproj</string>
</array>
<key>WindowString</key>
<string>0 128 1440 750 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj b/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj
index 935c9fd..a4daa76 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/project.pbxproj
@@ -1,317 +1,325 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
431C7D5711A402BC004F2B13 /* CDataScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */; };
431C7D5811A402BC004F2B13 /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4211A402BC004F2B13 /* CDataScanner.m */; };
431C7D5911A402BC004F2B13 /* CDataScanner_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */; };
431C7D5A11A402BC004F2B13 /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */; };
431C7D5B11A402BC004F2B13 /* NSCharacterSet_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */; };
431C7D5C11A402BC004F2B13 /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */; };
431C7D5D11A402BC004F2B13 /* NSDictionary_JSONExtensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */; };
431C7D5E11A402BC004F2B13 /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */; };
431C7D5F11A402BC004F2B13 /* NSScanner_Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */; };
431C7D6011A402BC004F2B13 /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */; };
431C7D6111A402BC004F2B13 /* CJSONDataSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */; };
431C7D6211A402BC004F2B13 /* CJSONDataSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */; };
431C7D6311A402BC004F2B13 /* CJSONDeserializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */; };
431C7D6411A402BC004F2B13 /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */; };
431C7D6511A402BC004F2B13 /* CJSONScanner.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D5111A402BC004F2B13 /* CJSONScanner.h */; };
431C7D6611A402BC004F2B13 /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5211A402BC004F2B13 /* CJSONScanner.m */; };
431C7D6711A402BC004F2B13 /* CJSONSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D5311A402BC004F2B13 /* CJSONSerializer.h */; };
431C7D6811A402BC004F2B13 /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5411A402BC004F2B13 /* CJSONSerializer.m */; };
431C7D6911A402BC004F2B13 /* CSerializedJSONData.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */; };
431C7D6A11A402BC004F2B13 /* CSerializedJSONData.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */; };
431C7D8311A4037C004F2B13 /* TouchJSON.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */; };
AA747D9F0F9514B9006C5449 /* TouchJSON_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
431C7D4111A402BC004F2B13 /* CDataScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner.h; sourceTree = "<group>"; };
431C7D4211A402BC004F2B13 /* CDataScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner.m; sourceTree = "<group>"; };
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDataScanner_Extensions.h; sourceTree = "<group>"; };
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDataScanner_Extensions.m; sourceTree = "<group>"; };
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSCharacterSet_Extensions.h; sourceTree = "<group>"; };
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSCharacterSet_Extensions.m; sourceTree = "<group>"; };
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSDictionary_JSONExtensions.h; sourceTree = "<group>"; };
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDictionary_JSONExtensions.m; sourceTree = "<group>"; };
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSScanner_Extensions.h; sourceTree = "<group>"; };
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSScanner_Extensions.m; sourceTree = "<group>"; };
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDataSerializer.h; sourceTree = "<group>"; };
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDataSerializer.m; sourceTree = "<group>"; };
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONDeserializer.h; sourceTree = "<group>"; };
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONDeserializer.m; sourceTree = "<group>"; };
431C7D5111A402BC004F2B13 /* CJSONScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONScanner.h; sourceTree = "<group>"; };
431C7D5211A402BC004F2B13 /* CJSONScanner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONScanner.m; sourceTree = "<group>"; };
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CJSONSerializer.h; sourceTree = "<group>"; };
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CJSONSerializer.m; sourceTree = "<group>"; };
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSerializedJSONData.h; sourceTree = "<group>"; };
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSerializedJSONData.m; sourceTree = "<group>"; };
431C7D8211A4037C004F2B13 /* TouchJSON.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TouchJSON.h; path = TouchJSON/TouchJSON.h; sourceTree = "<group>"; };
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchJSON_Prefix.pch; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libTouchJSON.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libTouchJSON.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libTouchJSON.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* TouchJSON */ = {
isa = PBXGroup;
children = (
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
431C7D8211A4037C004F2B13 /* TouchJSON.h */,
);
name = TouchJSON;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
431C7D4111A402BC004F2B13 /* CDataScanner.h */,
431C7D4211A402BC004F2B13 /* CDataScanner.m */,
431C7D4311A402BC004F2B13 /* Extensions */,
431C7D4C11A402BC004F2B13 /* JSON */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
431C7D4311A402BC004F2B13 /* Extensions */ = {
isa = PBXGroup;
children = (
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */,
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */,
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */,
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */,
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */,
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */,
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */,
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */,
);
path = Extensions;
sourceTree = "<group>";
};
431C7D4C11A402BC004F2B13 /* JSON */ = {
isa = PBXGroup;
children = (
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */,
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */,
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */,
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */,
431C7D5111A402BC004F2B13 /* CJSONScanner.h */,
431C7D5211A402BC004F2B13 /* CJSONScanner.m */,
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */,
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */,
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */,
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */,
);
path = JSON;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
AA747D9F0F9514B9006C5449 /* TouchJSON_Prefix.pch in Headers */,
431C7D5711A402BC004F2B13 /* CDataScanner.h in Headers */,
431C7D5911A402BC004F2B13 /* CDataScanner_Extensions.h in Headers */,
431C7D5B11A402BC004F2B13 /* NSCharacterSet_Extensions.h in Headers */,
431C7D5D11A402BC004F2B13 /* NSDictionary_JSONExtensions.h in Headers */,
431C7D5F11A402BC004F2B13 /* NSScanner_Extensions.h in Headers */,
431C7D6111A402BC004F2B13 /* CJSONDataSerializer.h in Headers */,
431C7D6311A402BC004F2B13 /* CJSONDeserializer.h in Headers */,
431C7D6511A402BC004F2B13 /* CJSONScanner.h in Headers */,
431C7D6711A402BC004F2B13 /* CJSONSerializer.h in Headers */,
431C7D6911A402BC004F2B13 /* CSerializedJSONData.h in Headers */,
431C7D8311A4037C004F2B13 /* TouchJSON.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* TouchJSON */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "TouchJSON" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = TouchJSON;
productName = TouchJSON;
productReference = D2AAC07E0554694100DB518D /* libTouchJSON.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "TouchJSON" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* TouchJSON */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* TouchJSON */,
);
};
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
431C7D5811A402BC004F2B13 /* CDataScanner.m in Sources */,
431C7D5A11A402BC004F2B13 /* CDataScanner_Extensions.m in Sources */,
431C7D5C11A402BC004F2B13 /* NSCharacterSet_Extensions.m in Sources */,
431C7D5E11A402BC004F2B13 /* NSDictionary_JSONExtensions.m in Sources */,
431C7D6011A402BC004F2B13 /* NSScanner_Extensions.m in Sources */,
431C7D6211A402BC004F2B13 /* CJSONDataSerializer.m in Sources */,
431C7D6411A402BC004F2B13 /* CJSONDeserializer.m in Sources */,
431C7D6611A402BC004F2B13 /* CJSONScanner.m in Sources */,
431C7D6811A402BC004F2B13 /* CJSONSerializer.m in Sources */,
431C7D6A11A402BC004F2B13 /* CSerializedJSONData.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/TouchJSON.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TouchJSON_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
+ OTHER_LDFLAGS = (
+ "-all_load",
+ "-ObjC",
+ );
PRODUCT_NAME = TouchJSON;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/TouchJSON.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = TouchJSON_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
+ OTHER_LDFLAGS = (
+ "-all_load",
+ "-ObjC",
+ );
PRODUCT_NAME = TouchJSON;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "TouchJSON" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "TouchJSON" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
index e8dd3c8..2f19530 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
+++ b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
@@ -1,710 +1,944 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
activeBuildConfigurationName = Debug;
- activeSDKPreference = iphonesimulator3.2;
+ activeSDKPreference = iphonesimulator4.0;
activeTarget = D2AAC07D0554694100DB518D /* CloudKit */;
addToTargets = (
D2AAC07D0554694100DB518D /* CloudKit */,
);
breakpoints = (
);
codeSenseManager = 43A20CA0116DBEAB00BA930A /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 930,
+ 968,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 10,
+ 928,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 296763053;
- PBXWorkspaceStateSaveDate = 296763053;
+ PBXPerProjectTemplateStateSaveDate = 300613003;
+ PBXWorkspaceStateSaveDate = 300613003;
};
perUserProjectItems = {
- 430538CB11A531EF003C39C8 = 430538CB11A531EF003C39C8 /* PBXTextBookmark */;
- 430538CC11A531EF003C39C8 = 430538CC11A531EF003C39C8 /* PBXTextBookmark */;
- 4305392211A5366B003C39C8 = 4305392211A5366B003C39C8 /* PBXTextBookmark */;
- 4305392311A5366B003C39C8 = 4305392311A5366B003C39C8 /* PBXTextBookmark */;
- 43053A4511A55F2B003C39C8 = 43053A4511A55F2B003C39C8 /* PBXTextBookmark */;
- 43053A4611A55F2B003C39C8 = 43053A4611A55F2B003C39C8 /* PBXTextBookmark */;
- 43053A4911A55F2B003C39C8 = 43053A4911A55F2B003C39C8 /* PBXTextBookmark */;
- 43053A8011A567AA003C39C8 = 43053A8011A567AA003C39C8 /* PBXTextBookmark */;
- 431C7F6011A4200A004F2B13 = 431C7F6011A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6111A4200A004F2B13 = 431C7F6111A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6211A4200A004F2B13 = 431C7F6211A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6311A4200A004F2B13 = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
- 433483CC1192BF28008295CA = 433483CC1192BF28008295CA /* PBXTextBookmark */;
- 4356347511B03EB600D8A3DC /* PBXTextBookmark */ = 4356347511B03EB600D8A3DC /* PBXTextBookmark */;
- 4356347611B03EB600D8A3DC /* PBXTextBookmark */ = 4356347611B03EB600D8A3DC /* PBXTextBookmark */;
- 4356347711B03EB600D8A3DC /* PBXTextBookmark */ = 4356347711B03EB600D8A3DC /* PBXTextBookmark */;
- 438E3A1511A58C1F0028F47F = 438E3A1511A58C1F0028F47F /* PBXTextBookmark */;
- 438E3A1711A58C1F0028F47F = 438E3A1711A58C1F0028F47F /* PBXTextBookmark */;
- 438E3A3911A58ECC0028F47F = 438E3A3911A58ECC0028F47F /* PBXTextBookmark */;
- 438E3A9211A599EE0028F47F = 438E3A9211A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9311A599EE0028F47F = 438E3A9311A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9411A599EE0028F47F = 438E3A9411A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9511A599EE0028F47F = 438E3A9511A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9611A599EE0028F47F = 438E3A9611A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9711A599EE0028F47F = 438E3A9711A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9811A599EE0028F47F = 438E3A9811A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9911A599EE0028F47F = 438E3A9911A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9A11A599EE0028F47F = 438E3A9A11A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9B11A599EE0028F47F = 438E3A9B11A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9D11A599EE0028F47F = 438E3A9D11A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9E11A599EE0028F47F = 438E3A9E11A599EE0028F47F /* PBXTextBookmark */;
- 438E3A9F11A599EE0028F47F = 438E3A9F11A599EE0028F47F /* PBXTextBookmark */;
- 438E3AA011A599EE0028F47F = 438E3AA011A599EE0028F47F /* PBXTextBookmark */;
- 438E3AA111A599EE0028F47F = 438E3AA111A599EE0028F47F /* PBXTextBookmark */;
- 43A20EB5116DD04D00BA930A = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
+ 4305392211A5366B003C39C8 /* PBXTextBookmark */ = 4305392211A5366B003C39C8 /* PBXTextBookmark */;
+ 4305392311A5366B003C39C8 /* PBXTextBookmark */ = 4305392311A5366B003C39C8 /* PBXTextBookmark */;
+ 431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6011A4200A004F2B13 /* PBXTextBookmark */;
+ 431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6211A4200A004F2B13 /* PBXTextBookmark */;
+ 431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
+ 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */ = 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */;
+ 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */ = 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */;
+ 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */;
+ 4322F4B911EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4B911EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4BA11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BA11EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4BB11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BB11EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4BC11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BC11EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4BD11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BD11EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4BF11EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4BF11EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4C011EA78B800A9CEF0 /* PBXTextBookmark */ = 4322F4C011EA78B800A9CEF0 /* PBXTextBookmark */;
+ 4322F4CB11EA791D00A9CEF0 /* PBXTextBookmark */ = 4322F4CB11EA791D00A9CEF0 /* PBXTextBookmark */;
+ 4322F50811EA7D3F00A9CEF0 /* PBXTextBookmark */ = 4322F50811EA7D3F00A9CEF0 /* PBXTextBookmark */;
+ 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */;
+ 4322F53911EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53911EA7F5F00A9CEF0 /* PBXTextBookmark */;
+ 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */ = 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */;
+ 4322F56111EAFD0E00A9CEF0 /* PBXTextBookmark */ = 4322F56111EAFD0E00A9CEF0 /* PBXTextBookmark */;
+ 4322F56211EAFD0E00A9CEF0 /* PBXTextBookmark */ = 4322F56211EAFD0E00A9CEF0 /* PBXTextBookmark */;
+ 4322F56411EAFD3E00A9CEF0 /* PBXTextBookmark */ = 4322F56411EAFD3E00A9CEF0 /* PBXTextBookmark */;
+ 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B211EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B211EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B511EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B511EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B611EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B611EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5BA11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BA11EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5BB11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BB11EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5BC11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BC11EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5BD11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BD11EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5BF11EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5BF11EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5C111EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5C111EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5C211EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5C211EB004600A9CEF0 /* PBXTextBookmark */;
+ 4322F5C311EB004600A9CEF0 /* XCBuildMessageTextBookmark */ = 4322F5C311EB004600A9CEF0 /* XCBuildMessageTextBookmark */;
+ 4322F5C511EB004600A9CEF0 /* PBXTextBookmark */ = 4322F5C511EB004600A9CEF0 /* PBXTextBookmark */;
+ 432D5B4811E7154D000F86DD /* PBXTextBookmark */ = 432D5B4811E7154D000F86DD /* PBXTextBookmark */;
+ 436F8B4111E463E900D37395 /* PBXTextBookmark */ = 436F8B4111E463E900D37395 /* PBXTextBookmark */;
+ 436F8DC011E4818800D37395 /* PBXTextBookmark */ = 436F8DC011E4818800D37395 /* PBXTextBookmark */;
+ 436F8DC111E4818800D37395 /* PBXTextBookmark */ = 436F8DC111E4818800D37395 /* PBXTextBookmark */;
+ 436F936311E4E8C700D37395 /* PBXTextBookmark */ = 436F936311E4E8C700D37395 /* PBXTextBookmark */;
+ 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1511A58C1F0028F47F /* PBXTextBookmark */;
+ 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1711A58C1F0028F47F /* PBXTextBookmark */;
+ 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = 438E3A9211A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9B11A599EE0028F47F /* PBXTextBookmark */;
+ 43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
};
sourceControlManager = 43A20C9F116DBEAB00BA930A /* Source Control */;
userBuildSettings = {
};
};
- 430538CB11A531EF003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */;
- name = "NSDictionary+CloudKitAdditions.h: 14";
- rLen = 0;
- rLoc = 296;
- rType = 0;
- vrLen = 334;
- vrLoc = 0;
- };
- 430538CC11A531EF003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */;
- name = "NSDictionary+CloudKitAdditions.m: 24";
- rLen = 0;
- rLoc = 633;
- rType = 0;
- vrLen = 706;
- vrLoc = 0;
- };
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{219, 28}";
sepNavVisRange = "{0, 253}";
};
};
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{253, 18}";
sepNavVisRange = "{0, 342}";
};
};
4305392211A5366B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */;
name = "NSMutableArray+CloudKitAdditions.h: 14";
rLen = 28;
rLoc = 219;
rType = 0;
vrLen = 253;
vrLoc = 0;
};
4305392311A5366B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */;
name = "NSMutableArray+CloudKitAdditions.m: 14";
rLen = 18;
rLoc = 253;
rType = 0;
vrLen = 342;
vrLoc = 0;
};
43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {3281, 1053}}";
sepNavSelRange = "{234, 0}";
sepNavVisRange = "{0, 439}";
};
};
- 43053A4511A55F2B003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */;
- name = "CKRequestManager.h: 19";
- rLen = 100;
- rLoc = 305;
- rType = 0;
- vrLen = 412;
- vrLoc = 0;
- };
- 43053A4611A55F2B003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */;
- name = "CKRequestManager.m: 25";
- rLen = 0;
- rLoc = 508;
- rType = 0;
- vrLen = 899;
- vrLoc = 0;
- };
- 43053A4911A55F2B003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
- name = "CKCloudKitManager.m: 72";
- rLen = 0;
- rLoc = 1878;
- rType = 0;
- vrLen = 1456;
- vrLoc = 0;
- };
- 43053A8011A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */;
- name = "CKCloudKitManager.h: 26";
- rLen = 0;
- rLoc = 765;
- rType = 0;
- vrLen = 788;
- vrLoc = 0;
- };
4317EFEC1181DB510045FF78 /* CloudKit.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
- sepNavSelRange = "{430, 0}";
- sepNavVisRange = "{0, 431}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 464}}";
+ sepNavSelRange = "{320, 0}";
+ sepNavVisRange = "{0, 433}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
- sepNavSelRange = "{765, 0}";
- sepNavVisRange = "{0, 788}";
+ sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
+ sepNavSelRange = "{736, 0}";
+ sepNavVisRange = "{0, 901}";
};
};
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
- sepNavSelRange = "{557, 0}";
- sepNavVisRange = "{0, 648}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{336, 98}";
+ sepNavVisRange = "{0, 656}";
};
};
4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
- sepNavSelRange = "{489, 0}";
- sepNavVisRange = "{0, 496}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{365, 0}";
+ sepNavVisRange = "{0, 504}";
sepNavWindowFrame = "{{38, 294}, {750, 558}}";
};
};
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1063, 456}}";
- sepNavSelRange = "{344, 0}";
- sepNavVisRange = "{0, 727}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{410, 0}";
+ sepNavVisRange = "{0, 833}";
};
};
4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 667}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
sepNavSelRange = "{305, 100}";
sepNavVisRange = "{0, 412}";
};
};
4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 442}}";
- sepNavSelRange = "{231, 0}";
- sepNavVisRange = "{0, 814}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{225, 0}";
+ sepNavVisRange = "{0, 829}";
};
};
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
- sepNavSelRange = "{566, 0}";
- sepNavVisRange = "{0, 572}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{343, 98}";
+ sepNavVisRange = "{0, 580}";
};
};
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1303, 590}}";
- sepNavSelRange = "{201, 11}";
- sepNavVisRange = "{0, 265}";
+ sepNavIntBoundsRect = "{{0, 0}, {1348, 589}}";
+ sepNavSelRange = "{246, 0}";
+ sepNavVisRange = "{0, 271}";
};
};
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 494}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 494}}";
sepNavSelRange = "{307, 0}";
- sepNavVisRange = "{0, 780}";
+ sepNavVisRange = "{0, 781}";
};
};
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 936}}";
- sepNavSelRange = "{1878, 0}";
- sepNavVisRange = "{0, 1456}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
+ sepNavSelRange = "{229, 0}";
+ sepNavVisRange = "{0, 851}";
};
};
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 689}}";
- sepNavSelRange = "{1146, 0}";
- sepNavVisRange = "{345, 925}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 702}}";
+ sepNavSelRange = "{1029, 134}";
+ sepNavVisRange = "{296, 988}";
};
};
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 832}}";
- sepNavSelRange = "{1147, 0}";
- sepNavVisRange = "{887, 1111}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 884}}";
+ sepNavSelRange = "{1757, 0}";
+ sepNavVisRange = "{972, 1331}";
+ sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 481}}";
- sepNavSelRange = "{562, 0}";
- sepNavVisRange = "{23, 544}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 520}}";
+ sepNavSelRange = "{625, 0}";
+ sepNavVisRange = "{0, 719}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 667}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1348, 857}}";
sepNavSelRange = "{508, 0}";
sepNavVisRange = "{0, 899}";
};
};
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 1196}}";
- sepNavSelRange = "{2287, 0}";
- sepNavVisRange = "{1881, 728}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1274}}";
+ sepNavSelRange = "{2699, 0}";
+ sepNavVisRange = "{41, 1067}";
};
};
4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 1703}}";
- sepNavSelRange = "{1596, 0}";
- sepNavVisRange = "{753, 1083}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1768}}";
+ sepNavSelRange = "{1106, 99}";
+ sepNavVisRange = "{733, 1037}";
};
};
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1303, 637}}";
- sepNavSelRange = "{209, 10}";
- sepNavVisRange = "{0, 1393}";
+ sepNavIntBoundsRect = "{{0, 0}, {1348, 637}}";
+ sepNavSelRange = "{291, 19}";
+ sepNavVisRange = "{0, 1399}";
};
};
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1303, 1209}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1222}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 1057}";
+ sepNavVisRange = "{0, 883}";
};
};
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 458}}";
sepNavSelRange = "{296, 0}";
sepNavVisRange = "{0, 334}";
};
};
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
- sepNavSelRange = "{633, 0}";
- sepNavVisRange = "{0, 706}";
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 458}}";
+ sepNavSelRange = "{240, 103}";
+ sepNavVisRange = "{0, 713}";
};
};
431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */;
name = "NSData+CloudKitAdditions.h: 12";
rLen = 11;
rLoc = 201;
rType = 0;
vrLen = 265;
vrLoc = 0;
};
- 431C7F6111A4200A004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */;
- name = "NSString+InflectionSupport.m: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1057;
- vrLoc = 0;
- };
431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */;
name = "NSData+CloudKitAdditions.m: 11";
rLen = 10;
rLoc = 209;
rType = 0;
vrLen = 1393;
vrLoc = 0;
};
431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */;
name = "NSKeyValueCoding.h: 127";
rLen = 30;
rLoc = 20057;
rType = 0;
vrLen = 2509;
vrLoc = 18489;
};
431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = NSKeyValueCoding.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h;
sourceTree = "<absolute>";
};
- 433483CC1192BF28008295CA /* PBXTextBookmark */ = {
+ 4322F40911EA6DE300A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
- name = "CKOAuthEngine.h: 19";
+ fRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */;
+ name = "CloudKit.h: 16";
rLen = 0;
- rLoc = 344;
+ rLoc = 320;
rType = 0;
- vrLen = 727;
+ vrLen = 433;
vrLoc = 0;
};
- 4356347511B03EB600D8A3DC /* PBXTextBookmark */ = {
+ 4322F44411EA6EC900A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
- name = "CKDictionarizerEngine.m: 49";
- rLen = 0;
- rLoc = 1246;
+ fRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */;
+ name = "NSDictionary+CloudKitAdditions.m: 14";
+ rLen = 103;
+ rLoc = 240;
rType = 0;
- vrLen = 997;
- vrLoc = 835;
+ vrLen = 713;
+ vrLoc = 0;
+ };
+ 4322F49E11EA739B00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */;
+ name = "NSURLRequest.h: 521";
+ rLen = 36;
+ rLoc = 20720;
+ rType = 0;
+ vrLen = 1375;
+ vrLoc = 21387;
+ };
+ 4322F49F11EA739B00A9CEF0 /* NSURLRequest.h */ = {
+ isa = PBXFileReference;
+ name = NSURLRequest.h;
+ path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSURLRequest.h;
+ sourceTree = "<absolute>";
};
- 4356347611B03EB600D8A3DC /* PBXTextBookmark */ = {
+ 4322F4B911EA78B800A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
- name = "CKEngine.h: 16";
+ name = "CKEngine.h: 15";
+ rLen = 97;
+ rLoc = 181;
+ rType = 0;
+ vrLen = 394;
+ vrLoc = 0;
+ };
+ 4322F4BA11EA78B800A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */;
+ name = "CKDictionarizerEngine.h: 19";
rLen = 0;
- rLoc = 373;
+ rLoc = 435;
rType = 0;
- vrLen = 386;
+ vrLen = 627;
vrLoc = 0;
};
- 4356347711B03EB600D8A3DC /* PBXTextBookmark */ = {
+ 4322F4BB11EA78B800A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
- name = "CKEngine.h: 12";
- rLen = 234;
- rLoc = 151;
+ fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
+ name = "CKJSONEngine.h: 17";
+ rLen = 0;
+ rLoc = 365;
rType = 0;
- vrLen = 386;
+ vrLen = 504;
vrLoc = 0;
};
- 435A08CD1191C14A00030F4C /* CKEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 442}}";
- sepNavSelRange = "{151, 234}";
- sepNavVisRange = "{0, 386}";
- };
+ 4322F4BC11EA78B800A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
+ name = "CKOAuthEngine.h: 19";
+ rLen = 0;
+ rLoc = 344;
+ rType = 0;
+ vrLen = 727;
+ vrLoc = 0;
};
- 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1251, 629}}";
- sepNavSelRange = "{187, 0}";
- sepNavVisRange = "{0, 188}";
- };
+ 4322F4BD11EA78B800A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
+ name = "CKHTTPBasicAuthenticationEngine.h: 18";
+ rLen = 0;
+ rLoc = 434;
+ rType = 0;
+ vrLen = 656;
+ vrLoc = 0;
};
- 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
- sepNavSelRange = "{558, 0}";
- sepNavVisRange = "{0, 619}";
- };
+ 4322F4BF11EA78B800A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
+ name = "CKRoutesEngine.h: 18";
+ rLen = 98;
+ rLoc = 343;
+ rType = 0;
+ vrLen = 580;
+ vrLoc = 0;
};
- 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 1833}}";
- sepNavSelRange = "{1246, 0}";
- sepNavVisRange = "{835, 997}";
- };
+ 4322F4C011EA78B800A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
+ name = "CKRoutesEngine.m: 45";
+ rLen = 99;
+ rLoc = 1106;
+ rType = 0;
+ vrLen = 1096;
+ vrLoc = 733;
};
- 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = {
+ 4322F4CB11EA791D00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */;
- name = "Base64Transcoder.c: 148";
+ fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
+ name = "CKRequestOperation.h: 19";
rLen = 0;
- rLoc = 6726;
+ rLoc = 398;
rType = 0;
- vrLen = 1330;
- vrLoc = 6128;
- };
- 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.c;
- name = Base64Transcoder.c;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/Base64Transcoder.c";
- sourceTree = "<absolute>";
+ vrLen = 821;
+ vrLoc = 0;
};
- 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = {
+ 4322F50811EA7D3F00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 438E3A1811A58C1F0028F47F /* FBDialog.m */;
- name = "FBDialog.m: 322";
+ fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
+ name = "CKRequestOperation.m: 26";
rLen = 0;
- rLoc = 11414;
+ rLoc = 675;
rType = 0;
- vrLen = 1860;
- vrLoc = 10804;
+ vrLen = 1193;
+ vrLoc = 1311;
};
- 438E3A1811A58C1F0028F47F /* FBDialog.m */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.objc;
- name = FBDialog.m;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBDialog.m";
- sourceTree = "<absolute>";
+ 4322F53811EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */;
+ name = "NSString+InflectionSupport.m: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 883;
+ vrLoc = 0;
};
- 438E3A3911A58ECC0028F47F /* PBXTextBookmark */ = {
+ 4322F53911EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */;
name = "NSString+InflectionSupport.h: 16";
rLen = 0;
rLoc = 307;
rType = 0;
- vrLen = 780;
+ vrLen = 781;
vrLoc = 0;
};
- 438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {
- uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
- sepNavSelRange = "{366, 0}";
- sepNavVisRange = "{0, 366}";
- };
+ 4322F53A11EA7F5F00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */;
+ name = "NSDictionary+CloudKitAdditions.h: 14";
+ rLen = 0;
+ rLoc = 296;
+ rType = 0;
+ vrLen = 334;
+ vrLoc = 0;
};
- 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F56111EAFD0E00A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
- name = "CKOAuthEngine.m: 36";
+ fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
+ name = "CKDictionarizerEngine.m: 105";
rLen = 0;
- rLoc = 562;
+ rLoc = 3461;
rType = 0;
- vrLen = 544;
- vrLoc = 23;
+ vrLen = 838;
+ vrLoc = 0;
+ };
+ 4322F56211EAFD0E00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
+ name = "CKJSONEngine.m: 34";
+ rLen = 0;
+ rLoc = 1228;
+ rType = 0;
+ vrLen = 1302;
+ vrLoc = 156;
+ };
+ 4322F56411EAFD3E00A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
+ name = "CKJSONEngine.m: 19";
+ rLen = 0;
+ rLoc = 419;
+ rType = 0;
+ vrLen = 1308;
+ vrLoc = 156;
+ };
+ 4322F5AF11EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
+ name = "CKHTTPBasicAuthenticationEngine.h: 17";
+ rLen = 98;
+ rLoc = 336;
+ rType = 0;
+ vrLen = 656;
+ vrLoc = 0;
};
- 438E3A9311A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B011EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */;
name = "CKDictionarizerEngine.h: 19";
- rLen = 0;
- rLoc = 558;
+ rLen = 133;
+ rLoc = 435;
rType = 0;
- vrLen = 619;
+ vrLen = 627;
vrLoc = 0;
};
- 438E3A9411A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B111EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
- name = "CKHTTPBasicAuthenticationEngine.m: 40";
+ name = "CKHTTPBasicAuthenticationEngine.m: 41";
+ rLen = 134;
+ rLoc = 1029;
+ rType = 0;
+ vrLen = 988;
+ vrLoc = 296;
+ };
+ 4322F5B211EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
+ name = "CKDictionarizerEngine.m: 131";
rLen = 0;
- rLoc = 1146;
+ rLoc = 4063;
rType = 0;
- vrLen = 925;
- vrLoc = 345;
+ vrLen = 787;
+ vrLoc = 3351;
};
- 438E3A9511A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B311EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
- name = "CKHTTPBasicAuthenticationEngine.h: 18";
+ fRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */;
+ name = "CKRequestDelegate.h: 17";
rLen = 0;
- rLoc = 557;
+ rLoc = 367;
rType = 0;
- vrLen = 648;
+ vrLen = 367;
vrLoc = 0;
};
- 438E3A9611A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B411EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
- name = "CKRoutesEngine.h: 20";
- rLen = 0;
- rLoc = 566;
+ fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
+ name = "CKEngine.h: 14";
+ rLen = 232;
+ rLoc = 180;
rType = 0;
- vrLen = 572;
+ vrLen = 418;
vrLoc = 0;
};
- 438E3A9711A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B511EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
- name = "CKRoutesEngine.m: 55";
+ fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
+ name = "CKOAuthEngine.m: 29";
rLen = 0;
- rLoc = 1596;
+ rLoc = 625;
rType = 0;
- vrLen = 1083;
- vrLoc = 753;
+ vrLen = 719;
+ vrLoc = 0;
};
- 438E3A9811A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B611EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
- name = "CKEngine.h: 16";
+ fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
+ name = "CKOAuthEngine.h: 21";
rLen = 0;
- rLoc = 373;
+ rLoc = 410;
rType = 0;
- vrLen = 386;
+ vrLen = 833;
vrLoc = 0;
};
- 438E3A9911A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5B711EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */;
- name = "CloudKit.h: 21";
+ fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
+ name = "CKRoutesEngine.h: 18";
+ rLen = 98;
+ rLoc = 343;
+ rType = 0;
+ vrLen = 580;
+ vrLoc = 0;
+ };
+ 4322F5B811EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
+ name = "CKRoutesEngine.m: 45";
+ rLen = 99;
+ rLoc = 1106;
+ rType = 0;
+ vrLen = 1037;
+ vrLoc = 733;
+ };
+ 4322F5B911EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
+ name = "CKCloudKitManager.m: 11";
rLen = 0;
- rLoc = 430;
+ rLoc = 229;
rType = 0;
- vrLen = 431;
+ vrLen = 851;
vrLoc = 0;
};
- 438E3A9A11A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5BA11EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
+ name = "CKRequestOperation.m: 92";
+ rLen = 0;
+ rLoc = 2699;
+ rType = 0;
+ vrLen = 1067;
+ vrLoc = 41;
+ };
+ 4322F5BB11EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
name = "CKRequestOperation.h: 13";
rLen = 0;
- rLoc = 231;
+ rLoc = 225;
rType = 0;
- vrLen = 814;
+ vrLen = 829;
vrLoc = 0;
};
- 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5BC11EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 438E3A9C11A599EE0028F47F /* FBRequest.h */;
- name = "FBRequest.h: 134";
- rLen = 70;
- rLoc = 3444;
+ fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
+ name = "CKJSONEngine.h: 17";
+ rLen = 0;
+ rLoc = 365;
rType = 0;
- vrLen = 852;
- vrLoc = 3045;
+ vrLen = 504;
+ vrLoc = 0;
};
- 438E3A9C11A599EE0028F47F /* FBRequest.h */ = {
+ 4322F5BD11EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4322F5BE11EB004600A9CEF0 /* CJSONSerializer.h */;
+ name = "CJSONSerializer.h: 42";
+ rLen = 44;
+ rLoc = 1763;
+ rType = 0;
+ vrLen = 1644;
+ vrLoc = 213;
+ };
+ 4322F5BE11EB004600A9CEF0 /* CJSONSerializer.h */ = {
isa = PBXFileReference;
- lastKnownFileType = sourcecode.c.h;
- name = FBRequest.h;
- path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/src/FBConnect/FBRequest.h";
+ name = CJSONSerializer.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/JSON/CJSONSerializer.h";
sourceTree = "<absolute>";
};
- 438E3A9D11A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5BF11EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
- name = "CKRequestOperation.m: 74";
+ fRef = 4322F5C011EB004600A9CEF0 /* CJSONDataSerializer.h */;
+ name = "CJSONDataSerializer.h: 38";
+ rLen = 42;
+ rLoc = 1512;
+ rType = 0;
+ vrLen = 1405;
+ vrLoc = 409;
+ };
+ 4322F5C011EB004600A9CEF0 /* CJSONDataSerializer.h */ = {
+ isa = PBXFileReference;
+ name = CJSONDataSerializer.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/JSON/CJSONDataSerializer.h";
+ sourceTree = "<absolute>";
+ };
+ 4322F5C111EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
+ name = "CKJSONEngine.m: 52";
rLen = 0;
- rLoc = 2287;
+ rLoc = 1757;
rType = 0;
- vrLen = 728;
- vrLoc = 1881;
+ vrLen = 1331;
+ vrLoc = 972;
};
- 438E3A9E11A599EE0028F47F /* PBXTextBookmark */ = {
+ 4322F5C211EB004600A9CEF0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
- name = "CKJSONEngine.h: 17";
+ fRef = 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */;
+ name = "Base64Transcoder.c: 148";
+ rLen = 0;
+ rLoc = 6726;
+ rType = 0;
+ vrLen = 1330;
+ vrLoc = 6128;
+ };
+ 4322F5C311EB004600A9CEF0 /* XCBuildMessageTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "Although the value stored to 'e' is used in the enclosing expression, the value is never actually read from 'e'";
+ fRef = 4322F5C411EB004600A9CEF0 /* sha1.c */;
+ fallbackIsa = XCBuildMessageTextBookmark;
+ rLen = 1;
+ rLoc = 99;
+ rType = 1;
+ };
+ 4322F5C411EB004600A9CEF0 /* sha1.c */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = sha1.c;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/sha1.c";
+ sourceTree = "<absolute>";
+ };
+ 4322F5C511EB004600A9CEF0 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4322F5C611EB004600A9CEF0 /* sha1.c */;
+ name = "sha1.c: 100";
+ rLen = 0;
+ rLoc = 3968;
+ rType = 0;
+ vrLen = 1122;
+ vrLoc = 3315;
+ };
+ 4322F5C611EB004600A9CEF0 /* sha1.c */ = {
+ isa = PBXFileReference;
+ name = sha1.c;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/sha1.c";
+ sourceTree = "<absolute>";
+ };
+ 432D5B4811E7154D000F86DD /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
+ name = "CKHTTPBasicAuthenticationEngine.m: 35";
+ rLen = 6;
+ rLoc = 895;
+ rType = 0;
+ vrLen = 1127;
+ vrLoc = 149;
+ };
+ 435A08CD1191C14A00030F4C /* CKEngine.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{180, 232}";
+ sepNavVisRange = "{0, 418}";
+ };
+ };
+ 436F8B4111E463E900D37395 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */;
+ name = "CKRequestManager.m: 25";
+ rLen = 0;
+ rLoc = 508;
+ rType = 0;
+ vrLen = 899;
+ vrLoc = 0;
+ };
+ 436F8DC011E4818800D37395 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */;
+ name = "CKRequestManager.h: 19";
+ rLen = 100;
+ rLoc = 305;
+ rType = 0;
+ vrLen = 412;
+ vrLoc = 0;
+ };
+ 436F8DC111E4818800D37395 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */;
+ name = "CKCloudKitManager.h: 26";
rLen = 0;
- rLoc = 489;
+ rLoc = 736;
rType = 0;
- vrLen = 496;
+ vrLen = 901;
vrLoc = 0;
};
- 438E3A9F11A599EE0028F47F /* PBXTextBookmark */ = {
+ 436F936311E4E8C700D37395 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 37";
+ fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
+ name = "CKCloudKitManager.m: 52";
rLen = 0;
- rLoc = 1147;
+ rLoc = 1358;
rType = 0;
- vrLen = 1111;
- vrLoc = 887;
+ vrLen = 2025;
+ vrLoc = 257;
};
- 438E3AA011A599EE0028F47F /* PBXTextBookmark */ = {
+ 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1251, 629}}";
+ sepNavSelRange = "{187, 0}";
+ sepNavVisRange = "{0, 188}";
+ };
+ };
+ 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{435, 133}";
+ sepNavVisRange = "{0, 627}";
+ };
+ };
+ 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 1755}}";
+ sepNavSelRange = "{4063, 0}";
+ sepNavVisRange = "{3351, 787}";
+ };
+ };
+ 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
- name = "CKDictionarizerEngine.m: 53";
+ fRef = 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */;
+ name = "Base64Transcoder.c: 148";
rLen = 0;
- rLoc = 1400;
+ rLoc = 6726;
rType = 0;
- vrLen = 952;
- vrLoc = 629;
+ vrLen = 1330;
+ vrLoc = 6128;
};
- 438E3AA111A599EE0028F47F /* PBXTextBookmark */ = {
+ 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = Base64Transcoder.c;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/Base64Transcoder.c";
+ sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 2912}}";
+ sepNavSelRange = "{6726, 0}";
+ sepNavVisRange = "{6128, 1330}";
+ };
+ };
+ 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
- name = "CKDictionarizerEngine.m: 49";
+ fRef = 438E3A1811A58C1F0028F47F /* FBDialog.m */;
+ name = "FBDialog.m: 322";
+ rLen = 0;
+ rLoc = 11414;
+ rType = 0;
+ vrLen = 1860;
+ vrLoc = 10804;
+ };
+ 438E3A1811A58C1F0028F47F /* FBDialog.m */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.objc;
+ name = FBDialog.m;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBDialog.m";
+ sourceTree = "<absolute>";
+ };
+ 438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1146, 451}}";
+ sepNavSelRange = "{367, 0}";
+ sepNavVisRange = "{0, 367}";
+ };
+ };
+ 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
+ name = "CKOAuthEngine.m: 36";
rLen = 0;
- rLoc = 1246;
+ rLoc = 741;
rType = 0;
- vrLen = 997;
- vrLoc = 835;
+ vrLen = 544;
+ vrLoc = 23;
+ };
+ 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 438E3A9C11A599EE0028F47F /* FBRequest.h */;
+ name = "FBRequest.h: 134";
+ rLen = 70;
+ rLoc = 3444;
+ rType = 0;
+ vrLen = 852;
+ vrLoc = 3045;
+ };
+ 438E3A9C11A599EE0028F47F /* FBRequest.h */ = {
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = FBRequest.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/src/FBConnect/FBRequest.h";
+ sourceTree = "<absolute>";
};
43A20C9F116DBEAB00BA930A /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
43A20CA0116DBEAB00BA930A /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 43A20EB6116DD04D00BA930A /* NSString.h */;
name = "NSString.h: 187";
rLen = 120;
rLoc = 9394;
rType = 0;
vrLen = 3358;
vrLoc = 7953;
};
43A20EB6116DD04D00BA930A /* NSString.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = NSString.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h;
sourceTree = "<absolute>";
};
D2AAC07D0554694100DB518D /* CloudKit */ = {
activeExec = 0;
};
}
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3 b/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
index ab38df2..b6c4740 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
+++ b/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
@@ -1,1202 +1,1213 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
<array/>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
- <real>227</real>
+ <real>189</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>43053A2811A55962003C39C8</string>
<string>43A20CF0116DC0DA00BA930A</string>
+ <string>43A20CF1116DC0DA00BA930A</string>
<string>43A20CE0116DC0DA00BA930A</string>
<string>438E39B611A5831B0028F47F</string>
+ <string>43A20FD4116DD8F900BA930A</string>
<string>43A20DA1116DC5A400BA930A</string>
+ <string>43A2108A116DEB3900BA930A</string>
+ <string>43A20DA2116DC5B000BA930A</string>
+ <string>43A20CE9116DC0DA00BA930A</string>
+ <string>43A2107F116DEB2000BA930A</string>
+ <string>43A20CE5116DC0DA00BA930A</string>
+ <string>43A21086116DEB2B00BA930A</string>
+ <string>43A20CE2116DC0DA00BA930A</string>
<string>435A08CC1191C13000030F4C</string>
<string>32C88DFF0371C24200C91783</string>
+ <string>0867D69AFE84028FC02AAC07</string>
+ <string>034768DFFF38A50411DB9C8B</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>26</integer>
- <integer>25</integer>
- <integer>2</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 34}, {249, 691}}</string>
+ <string>{{0, 0}, {211, 702}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {266, 709}}</string>
+ <string>{{0, 0}, {228, 720}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
- <real>227</real>
+ <real>189</real>
</array>
<key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>0 117 1440 761 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
- <string>266pt</string>
+ <string>228pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CKEngine.h</string>
+ <string>sha1.c</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CKEngine.h</string>
+ <string>sha1.c</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>4356347711B03EB600D8A3DC</string>
+ <string>4322F5C511EB004600A9CEF0</string>
<key>history</key>
<array>
<string>43A20EB5116DD04D00BA930A</string>
- <string>433483CC1192BF28008295CA</string>
<string>431C7F6011A4200A004F2B13</string>
- <string>431C7F6111A4200A004F2B13</string>
<string>431C7F6211A4200A004F2B13</string>
<string>431C7F6311A4200A004F2B13</string>
- <string>430538CB11A531EF003C39C8</string>
- <string>430538CC11A531EF003C39C8</string>
<string>4305392211A5366B003C39C8</string>
<string>4305392311A5366B003C39C8</string>
- <string>43053A4511A55F2B003C39C8</string>
- <string>43053A4611A55F2B003C39C8</string>
- <string>43053A4911A55F2B003C39C8</string>
- <string>43053A8011A567AA003C39C8</string>
- <string>438E3A1511A58C1F0028F47F</string>
<string>438E3A1711A58C1F0028F47F</string>
- <string>438E3A3911A58ECC0028F47F</string>
- <string>438E3A9211A599EE0028F47F</string>
- <string>438E3A9311A599EE0028F47F</string>
- <string>438E3A9411A599EE0028F47F</string>
- <string>438E3A9511A599EE0028F47F</string>
- <string>438E3A9611A599EE0028F47F</string>
- <string>438E3A9711A599EE0028F47F</string>
- <string>438E3A9911A599EE0028F47F</string>
- <string>438E3A9A11A599EE0028F47F</string>
<string>438E3A9B11A599EE0028F47F</string>
- <string>438E3A9D11A599EE0028F47F</string>
- <string>438E3A9E11A599EE0028F47F</string>
- <string>438E3A9F11A599EE0028F47F</string>
- <string>4356347511B03EB600D8A3DC</string>
- <string>4356347611B03EB600D8A3DC</string>
+ <string>436F8B4111E463E900D37395</string>
+ <string>436F8DC011E4818800D37395</string>
+ <string>436F8DC111E4818800D37395</string>
+ <string>4322F40911EA6DE300A9CEF0</string>
+ <string>4322F44411EA6EC900A9CEF0</string>
+ <string>4322F49E11EA739B00A9CEF0</string>
+ <string>4322F53811EA7F5F00A9CEF0</string>
+ <string>4322F53911EA7F5F00A9CEF0</string>
+ <string>4322F53A11EA7F5F00A9CEF0</string>
+ <string>4322F5AF11EB004600A9CEF0</string>
+ <string>4322F5B011EB004600A9CEF0</string>
+ <string>4322F5B111EB004600A9CEF0</string>
+ <string>4322F5B211EB004600A9CEF0</string>
+ <string>4322F5B311EB004600A9CEF0</string>
+ <string>4322F5B411EB004600A9CEF0</string>
+ <string>4322F5B511EB004600A9CEF0</string>
+ <string>4322F5B611EB004600A9CEF0</string>
+ <string>4322F5B711EB004600A9CEF0</string>
+ <string>4322F5B811EB004600A9CEF0</string>
+ <string>4322F5B911EB004600A9CEF0</string>
+ <string>4322F5BA11EB004600A9CEF0</string>
+ <string>4322F5BB11EB004600A9CEF0</string>
+ <string>4322F5BC11EB004600A9CEF0</string>
+ <string>4322F5BD11EB004600A9CEF0</string>
+ <string>4322F5BF11EB004600A9CEF0</string>
+ <string>4322F5C111EB004600A9CEF0</string>
+ <string>4322F5C211EB004600A9CEF0</string>
+ <string>4322F5C311EB004600A9CEF0</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1169, 474}}</string>
+ <string>{{0, 0}, {1207, 483}}</string>
<key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>0 117 1440 761 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>474pt</string>
+ <string>483pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>230pt</string>
+ <string>232pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1169, 203}}</string>
- <key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>{{10, 27}, {1207, 205}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1169, 196}}</string>
+ <string>{{10, 27}, {1409, 245}}</string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1124, 223}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
<integer>1021</integer>
<key>XCBuildResultsTrigger_Open</key>
<integer>1011</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1169, 196}}</string>
+ <string>{{10, 27}, {1207, 205}}</string>
+ <key>RubberWindowFrame</key>
+ <string>0 117 1440 761 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
- <string>1169pt</string>
+ <string>1207pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
- <string>4356347811B03EB600D8A3DC</string>
+ <string>4322F5C711EB004600A9CEF0</string>
<string>1CA23ED40692098700951B8B</string>
- <string>4356347911B03EB600D8A3DC</string>
+ <string>4322F5C811EB004600A9CEF0</string>
<string>433104F70F1280740091B39C</string>
- <string>4356347A11B03EB600D8A3DC</string>
+ <string>4322F5C911EB004600A9CEF0</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1440, 197}}</string>
+ <string>{{0, 0}, {1440, 200}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
- <string>197pt</string>
+ <string>200pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {720, 252}}</string>
- <string>{{720, 0}, {720, 252}}</string>
+ <string>{{0, 0}, {720, 256}}</string>
+ <string>{{720, 0}, {720, 256}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
- <string>{{0, 0}, {1440, 252}}</string>
- <string>{{0, 252}, {1440, 255}}</string>
+ <string>{{0, 0}, {1440, 256}}</string>
+ <string>{{0, 256}, {1440, 259}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
- <string>{{0, 202}, {1440, 507}}</string>
+ <string>{{0, 205}, {1440, 515}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
- <string>{{720, 0}, {720, 252}}</string>
+ <string>{{720, 0}, {720, 256}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
- <string>507pt</string>
+ <string>515pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
- <string>438E397611A56CDF0028F47F</string>
+ <string>4322F52A11EA7F0C00A9CEF0</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
- <string>438E397711A56CDF0028F47F</string>
- <string>438E397811A56CDF0028F47F</string>
- <string>438E397911A56CDF0028F47F</string>
- <string>438E397A11A56CDF0028F47F</string>
+ <string>4322F52B11EA7F0C00A9CEF0</string>
+ <string>4322F52C11EA7F0C00A9CEF0</string>
+ <string>4322F52D11EA7F0C00A9CEF0</string>
+ <string>4322F52E11EA7F0C00A9CEF0</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
<real>0.0</real>
<key>ToolbarDisplayMode</key>
<integer>1</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/platform/iPhone/CloudKit.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
+ <string>0 117 1440 761 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.debuggerConsole</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAAC065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {700, 358}}</string>
<key>RubberWindowFrame</key>
<string>149 87 700 400 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Name</key>
<string>Debugger Console</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugCLIModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D5B069F1CE1000CFCEE</string>
<string>1C530D5C069F1CE1000CFCEE</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>149 87 440 400 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D5B069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.scm</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB2065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB3065D492600B07095</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {452, 0}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>0pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052920623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>SCM</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ConsoleFrame</key>
<string>{{0, 259}, {452, 0}}</string>
<key>Frame</key>
<string>{{0, 7}, {452, 259}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
<key>TableConfiguration</key>
<array>
<string>Status</string>
<real>30</real>
<string>FileName</string>
<real>199</real>
<string>Path</string>
<real>197.09500122070312</real>
</array>
<key>TableFrame</key>
<string>{{0, 0}, {452, 250}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Proportion</key>
<string>262pt</string>
</dict>
</array>
<key>Proportion</key>
<string>266pt</string>
</dict>
</array>
<key>Name</key>
<string>SCM</string>
<key>ServiceClasses</key>
<array>
<string>PBXCVSModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAB4065D492600B07095</string>
<string>1C78EAB5065D492600B07095</string>
<string>1C78EAB2065D492600B07095</string>
<string>1CD052920623707200166675</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.scmV3</string>
<key>WindowString</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CE0B1FE06471DED0097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>no</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>168</real>
diff --git a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj b/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
index 1e86f09..11d91f9 100644
--- a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
+++ b/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
@@ -1,612 +1,608 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */; };
4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */; };
4317EFED1181DB510045FF78 /* CloudKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */; };
4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */; };
4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */; };
4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */; };
4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */; };
4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */; };
4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */; };
4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */; };
4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */; };
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */; };
4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */; };
4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */; };
4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */; };
4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */; };
4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */; };
4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */; };
4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */; };
4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */; };
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */; };
- 4317F1391181E2480045FF78 /* libOAuthConsumer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */; settings = {ATTRIBUTES = (Required, ); }; };
- 4317F13A1181E2510045FF78 /* libFBPlatform.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0E91181E0B80045FF78 /* libFBPlatform.a */; settings = {ATTRIBUTES = (Required, ); }; };
431C7DB411A40519004F2B13 /* libTouchJSON.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431C7D7611A402FA004F2B13 /* libTouchJSON.a */; };
431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */; };
431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */; };
+ 432D5B6B11E7163E000F86DD /* libOAuthConsumer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */; };
435A08CE1191C14A00030F4C /* CKEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 435A08CD1191C14A00030F4C /* CKEngine.h */; };
4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */; };
438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */; };
438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */; };
438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE61A71B0DE2551300D4F7B9;
remoteInfo = FBPlatform;
};
4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = OAuthConsumer;
};
- 4317F1291181E22F0045FF78 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = BE61A71A0DE2551300D4F7B9;
- remoteInfo = FBPlatform;
- };
4317F12B1181E2320045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = OAuthConsumer;
};
431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = TouchJSON;
};
431C7DB511A40525004F2B13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = TouchJSON;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+CloudKitAdditions.h"; path = "../../src/NSMutableArray+CloudKitAdditions.h"; sourceTree = "<group>"; };
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+CloudKitAdditions.m"; path = "../../src/NSMutableArray+CloudKitAdditions.m"; sourceTree = "<group>"; };
43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = HTTPStatus.strings; path = ../../src/HTTPStatus.strings; sourceTree = "<group>"; };
4317EFEC1181DB510045FF78 /* CloudKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudKit.h; path = ../../src/CloudKit/CloudKit.h; sourceTree = SOURCE_ROOT; };
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKCloudKitManager.h; path = ../../src/CKCloudKitManager.h; sourceTree = SOURCE_ROOT; };
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKHTTPBasicAuthenticationEngine.h; path = ../../src/CKHTTPBasicAuthenticationEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKJSONEngine.h; path = ../../src/CKJSONEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKOAuthEngine.h; path = ../../src/CKOAuthEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestManager.h; path = ../../src/CKRequestManager.h; sourceTree = SOURCE_ROOT; };
4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestOperation.h; path = ../../src/CKRequestOperation.h; sourceTree = SOURCE_ROOT; };
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRoutesEngine.h; path = ../../src/CKRoutesEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+CloudKitAdditions.h"; path = "../../src/NSData+CloudKitAdditions.h"; sourceTree = SOURCE_ROOT; };
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+InflectionSupport.h"; path = "../../src/NSString+InflectionSupport.h"; sourceTree = SOURCE_ROOT; };
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKCloudKitManager.m; path = ../../src/CKCloudKitManager.m; sourceTree = SOURCE_ROOT; };
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKHTTPBasicAuthenticationEngine.m; path = ../../src/CKHTTPBasicAuthenticationEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKJSONEngine.m; path = ../../src/CKJSONEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKOAuthEngine.m; path = ../../src/CKOAuthEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestManager.m; path = ../../src/CKRequestManager.m; sourceTree = SOURCE_ROOT; };
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestOperation.m; path = ../../src/CKRequestOperation.m; sourceTree = SOURCE_ROOT; };
4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRoutesEngine.m; path = ../../src/CKRoutesEngine.m; sourceTree = SOURCE_ROOT; };
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+CloudKitAdditions.m"; path = "../../src/NSData+CloudKitAdditions.m"; sourceTree = SOURCE_ROOT; };
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+InflectionSupport.m"; path = "../../src/NSString+InflectionSupport.m"; sourceTree = SOURCE_ROOT; };
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TouchJSON.xcodeproj; path = "../../lib/touchjson-objc/src/TouchJSON.xcodeproj"; sourceTree = SOURCE_ROOT; };
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CloudKitAdditions.h"; path = "../../src/NSDictionary+CloudKitAdditions.h"; sourceTree = "<group>"; };
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CloudKitAdditions.m"; path = "../../src/NSDictionary+CloudKitAdditions.m"; sourceTree = "<group>"; };
435A08CD1191C14A00030F4C /* CKEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKEngine.h; path = ../../src/CKEngine.h; sourceTree = "<group>"; };
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloudKit_Prefix.pch; sourceTree = "<group>"; };
438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKDictionarizerEngine.h; path = ../../src/CKDictionarizerEngine.h; sourceTree = "<group>"; };
438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKDictionarizerEngine.m; path = ../../src/CKDictionarizerEngine.m; sourceTree = "<group>"; };
438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestDelegate.h; path = ../../src/CKRequestDelegate.h; sourceTree = "<group>"; };
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OAuthConsumer.xcodeproj; path = "../../lib/oauth-objc/platform/iPhone/OAuthConsumer.xcodeproj"; sourceTree = SOURCE_ROOT; };
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FBConnect.xcodeproj; path = "../../lib/fbconnect-objc/platform/iPhone/FBConnect.xcodeproj"; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libCloudKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCloudKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
- 4317F1391181E2480045FF78 /* libOAuthConsumer.a in Frameworks */,
- 4317F13A1181E2510045FF78 /* libFBPlatform.a in Frameworks */,
431C7DB411A40519004F2B13 /* libTouchJSON.a in Frameworks */,
+ 432D5B6B11E7163E000F86DD /* libOAuthConsumer.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libCloudKit.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* CloudKit */ = {
isa = PBXGroup;
children = (
4317EFEC1181DB510045FF78 /* CloudKit.h */,
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
43053A1111A55398003C39C8 /* HTTPStatus.strings */,
);
name = CloudKit;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
43053A2811A55962003C39C8 /* Core */,
43A20CF0116DC0DA00BA930A /* Utils */,
43A20CE0116DC0DA00BA930A /* Engines */,
435A08CC1191C13000030F4C /* Route engines */,
438E3A6A11A595740028F47F /* CKRequestDelegate.h */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
43053A2811A55962003C39C8 /* Core */ = {
isa = PBXGroup;
children = (
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */,
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */,
4317EFF41181DB850045FF78 /* CKRequestManager.h */,
4317EFFE1181DB850045FF78 /* CKRequestManager.m */,
4317EFF51181DB850045FF78 /* CKRequestOperation.h */,
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */,
);
name = Core;
sourceTree = "<group>";
};
4317F0E51181E0B80045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0E91181E0B80045FF78 /* libFBPlatform.a */,
);
name = Products;
sourceTree = "<group>";
};
4317F0ED1181E0C70045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */,
);
name = Products;
sourceTree = "<group>";
};
431C7D6F11A402FA004F2B13 /* Products */ = {
isa = PBXGroup;
children = (
431C7D7611A402FA004F2B13 /* libTouchJSON.a */,
);
name = Products;
sourceTree = "<group>";
};
435A08CC1191C13000030F4C /* Route engines */ = {
isa = PBXGroup;
children = (
435A08CD1191C14A00030F4C /* CKEngine.h */,
);
name = "Route engines";
sourceTree = "<group>";
};
438E39B611A5831B0028F47F /* Dictionarizer */ = {
isa = PBXGroup;
children = (
438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */,
438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */,
);
name = Dictionarizer;
sourceTree = "<group>";
};
43A20CE0116DC0DA00BA930A /* Engines */ = {
isa = PBXGroup;
children = (
438E39B611A5831B0028F47F /* Dictionarizer */,
43A20FD4116DD8F900BA930A /* Routes */,
43A20DA1116DC5A400BA930A /* JSON */,
43A20DA2116DC5B000BA930A /* XML */,
43A20CE9116DC0DA00BA930A /* FBConnect */,
43A20CE5116DC0DA00BA930A /* OAuth */,
43A20CE2116DC0DA00BA930A /* HTTP Basic */,
);
name = Engines;
sourceTree = "<group>";
};
43A20CE2116DC0DA00BA930A /* HTTP Basic */ = {
isa = PBXGroup;
children = (
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */,
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */,
);
name = "HTTP Basic";
sourceTree = "<group>";
};
43A20CE5116DC0DA00BA930A /* OAuth */ = {
isa = PBXGroup;
children = (
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */,
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */,
43A21086116DEB2B00BA930A /* Library */,
);
name = OAuth;
sourceTree = "<group>";
};
43A20CE9116DC0DA00BA930A /* FBConnect */ = {
isa = PBXGroup;
children = (
43A2107F116DEB2000BA930A /* Library */,
);
name = FBConnect;
sourceTree = "<group>";
};
43A20CF0116DC0DA00BA930A /* Utils */ = {
isa = PBXGroup;
children = (
43A20CF1116DC0DA00BA930A /* Extensions */,
);
name = Utils;
sourceTree = "<group>";
};
43A20CF1116DC0DA00BA930A /* Extensions */ = {
isa = PBXGroup;
children = (
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */,
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */,
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */,
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */,
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */,
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */,
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */,
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */,
);
name = Extensions;
sourceTree = "<group>";
};
43A20DA1116DC5A400BA930A /* JSON */ = {
isa = PBXGroup;
children = (
4317EFF21181DB850045FF78 /* CKJSONEngine.h */,
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */,
43A2108A116DEB3900BA930A /* Library */,
);
name = JSON;
sourceTree = "<group>";
};
43A20DA2116DC5B000BA930A /* XML */ = {
isa = PBXGroup;
children = (
);
name = XML;
sourceTree = "<group>";
};
43A20FD4116DD8F900BA930A /* Routes */ = {
isa = PBXGroup;
children = (
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */,
4317F0001181DB850045FF78 /* CKRoutesEngine.m */,
);
name = Routes;
sourceTree = "<group>";
};
43A2107F116DEB2000BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A21086116DEB2B00BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A2108A116DEB3900BA930A /* Library */ = {
isa = PBXGroup;
children = (
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */,
4317EFED1181DB510045FF78 /* CloudKit.h in Headers */,
4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */,
4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */,
4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */,
4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */,
4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */,
4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */,
4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */,
4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */,
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */,
435A08CE1191C14A00030F4C /* CKEngine.h in Headers */,
431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */,
4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */,
438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */,
438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* CloudKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
- 4317F12A1181E22F0045FF78 /* PBXTargetDependency */,
4317F12C1181E2320045FF78 /* PBXTargetDependency */,
431C7DB611A40525004F2B13 /* PBXTargetDependency */,
);
name = CloudKit;
productName = CloudKit;
productReference = D2AAC07E0554694100DB518D /* libCloudKit.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
ORGANIZATIONNAME = scrumers;
};
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* CloudKit */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 4317F0E51181E0B80045FF78 /* Products */;
ProjectRef = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
},
{
ProductGroup = 4317F0ED1181E0C70045FF78 /* Products */;
ProjectRef = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
},
{
ProductGroup = 431C7D6F11A402FA004F2B13 /* Products */;
ProjectRef = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
},
);
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* CloudKit */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
4317F0E91181E0B80045FF78 /* libFBPlatform.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libFBPlatform.a;
remoteRef = 4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libOAuthConsumer.a;
remoteRef = 4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431C7D7611A402FA004F2B13 /* libTouchJSON.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libTouchJSON.a;
remoteRef = 431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */,
4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */,
4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */,
4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */,
4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */,
4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */,
4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */,
4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */,
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */,
431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */,
4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */,
438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- 4317F12A1181E22F0045FF78 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- name = FBPlatform;
- targetProxy = 4317F1291181E22F0045FF78 /* PBXContainerItemProxy */;
- };
4317F12C1181E2320045FF78 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = OAuthConsumer;
targetProxy = 4317F12B1181E2320045FF78 /* PBXContainerItemProxy */;
};
431C7DB611A40525004F2B13 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = TouchJSON;
targetProxy = 431C7DB511A40525004F2B13 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/CloudKit.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
+ OTHER_LDFLAGS = (
+ "-all_load",
+ "-ObjC",
+ );
PRODUCT_NAME = CloudKit;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/CloudKit.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
+ OTHER_LDFLAGS = (
+ "-all_load",
+ "-ObjC",
+ );
PRODUCT_NAME = CloudKit;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"./../../lib/touchjson-objc/src//**",
"./../../lib/oauth-objc/src//**",
"./../../lib/fbconnect-objc/src//**",
);
OTHER_LDFLAGS = (
"-ObjC",
"-all_load",
);
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- OTHER_LDFLAGS = "-ObjC";
+ OTHER_LDFLAGS = (
+ "-ObjC",
+ "-all_load",
+ );
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
diff --git a/src/CKCloudKitManager.h b/src/CKCloudKitManager.h
index 1912e65..4ae38b2 100644
--- a/src/CKCloudKitManager.h
+++ b/src/CKCloudKitManager.h
@@ -1,28 +1,31 @@
//
// CKCloudKitManager.h
// Scrumers
//
// Created by Ludovic Galabru on 25/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
@protocol CKEngine;
@interface CKCloudKitManager : NSObject {
NSMutableArray *ordered_engines;
NSMutableDictionary *engines;
+ NSMutableDictionary *droppedEngines;
}
+ (CKCloudKitManager *)defaultConfiguration;
- (void)addEngine:(NSObject<CKEngine> *)engine withKey:(NSString *)key;
- (NSObject<CKEngine> *)engineForKey:(NSString *)key;
+- (void)dropEngineWithKey:(NSString *)key;
+- (void)restaureDroppedEngines;
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params andDelegate:(id)delegate;
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params;
- (void)sendRequest:(NSMutableURLRequest *)request;
@property(readonly) NSMutableArray *ordered_engines;
@end
diff --git a/src/CKCloudKitManager.m b/src/CKCloudKitManager.m
index 345b981..2987f6d 100644
--- a/src/CKCloudKitManager.m
+++ b/src/CKCloudKitManager.m
@@ -1,71 +1,86 @@
//
// CKCloudKitManager.m
// Scrumers
//
// Created by Ludovic Galabru on 25/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import "CKCloudKitManager.h"
#import "CKRequestManager.h"
+#import "CKRequestOperation.h"
#import "CKEngine.h"
@implementation CKCloudKitManager
@synthesize ordered_engines;
- (id)init {
self = [super init];
if (self != nil) {
ordered_engines= [[NSMutableArray alloc] init];
engines= [[NSMutableDictionary alloc] init];
+ droppedEngines= [[NSMutableDictionary alloc] init];
}
return self;
}
+ (CKCloudKitManager *)defaultConfiguration {
static CKCloudKitManager * defaultConfiguration = nil;
if (defaultConfiguration == nil) {
defaultConfiguration = [[CKCloudKitManager alloc] init];
}
return defaultConfiguration;
}
- (void)addEngine:(NSObject<CKEngine> *)engine withKey:(NSString *)key {
[ordered_engines addObject:key];
[engines setObject:engine forKey:key];
}
+- (void)dropEngineWithKey:(NSString *)key {
+ int index= [ordered_engines indexOfObject:key];
+ [ordered_engines removeObject:key];
+ [droppedEngines setValue:[NSNumber numberWithInt:index] forKey:key];
+}
+
+- (void)restaureDroppedEngines {
+ for (id key in [droppedEngines allKeys]) {
+ [ordered_engines insertObject:key atIndex:[[droppedEngines valueForKey:key] intValue]];
+ }
+}
+
- (NSObject<CKEngine> *)engineForKey:(NSString *)key {
return [engines objectForKey:key];
}
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params andDelegate:(id)delegate {
CKRequestOperation *requestOperation;
requestOperation= [CKRequestOperation operationWithRequest:request
params:params
delegate:delegate
- andCongiguration:self];
+ andConfiguration:self];
[[CKRequestManager sharedManager] processRequestOperation:requestOperation];
}
- (void)sendRequest:(NSMutableURLRequest *)request withParams:(NSDictionary *)params {
[self sendRequest:request withParams:params andDelegate:nil];
}
- (void)sendRequest:(NSMutableURLRequest *)request withDelegate:(id)delegate {
[self sendRequest:request withParams:nil andDelegate:delegate];
}
- (void)sendRequest:(NSMutableURLRequest *)request {
[self sendRequest:request withParams:nil andDelegate:nil];
}
- (void)dealloc {
[engines release];
[ordered_engines release];
+ [droppedEngines release];
[super dealloc];
}
@end
diff --git a/src/CKDictionarizerEngine.h b/src/CKDictionarizerEngine.h
index 70ea32d..9f3446b 100644
--- a/src/CKDictionarizerEngine.h
+++ b/src/CKDictionarizerEngine.h
@@ -1,23 +1,23 @@
//
// CKDictionarizerEngine.h
// CloudKit
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKDictionarizerEngine : NSObject <CKEngine> {
NSString *_localPrefix;
}
- (id)initWithLocalPrefix:(NSString *)localPrefix;
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@property(nonatomic, retain) NSString *localPrefix;
@end
diff --git a/src/CKDictionarizerEngine.m b/src/CKDictionarizerEngine.m
index 9a25c62..f5420cc 100644
--- a/src/CKDictionarizerEngine.m
+++ b/src/CKDictionarizerEngine.m
@@ -1,137 +1,139 @@
//
// CKDictionarizerEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 5/20/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import "CKDictionarizerEngine.h"
#import "objc/runtime.h"
#import "NSString+InflectionSupport.h"
@interface CKDictionarizerEngine (Private)
- (NSString *)localClassnameFor:(NSString *)classname;
- (NSString *)remoteClassnameFor:(NSString *)classname;
- (id)objectFromDictionary:(NSDictionary *)dictionary;
- (NSArray *)objectsFromDictionaries:(NSArray *)array;
- (NSDictionary *)dictionaryFromObject:(id)object;
- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects;
@end
@implementation CKDictionarizerEngine
@synthesize
localPrefix= _localPrefix;
- (id)initWithLocalPrefix:(NSString *)localPrefix {
self = [super init];
if (self != nil) {
self.localPrefix= localPrefix;
}
return self;
}
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
- id rawBody= [params valueForKey:@"HTTPBody"];
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
+ id rawBody= [*params valueForKey:@"HTTPBody"];
if (rawBody != nil) {
NSDictionary *processedBody;
if ([rawBody isKindOfClass:[NSArray class]]) {
processedBody= [self dictionaryFromObjects:rawBody];
} else {
processedBody= [self dictionaryFromObject:rawBody];
}
- [*request setHTTPBody:processedBody];
+ [*params setValue:processedBody forKey:@"HTTPBody"];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error; {
if (*data != nil) {
if ([*data isKindOfClass:[NSArray class]]) {
*data= [self objectsFromDictionaries:*data];
} else {
*data= [self objectFromDictionary:*data];
}
}
}
- (id)objectFromDictionary:(NSDictionary *)dictionary {
id remoteObject, localObject;
NSString *remoteClassname, *localClassname;
remoteClassname= [[dictionary allKeys] lastObject];
remoteObject= [dictionary valueForKey:remoteClassname];
localClassname= [self localClassnameFor:remoteClassname];
localObject= [[NSClassFromString(localClassname) alloc] init];
for (id remoteAttribute in [remoteObject allKeys]) {
NSString *localAttribute= [[NSString stringWithFormat:@"set_%@:", remoteAttribute] camelize];
if ([localObject respondsToSelector:NSSelectorFromString(localAttribute)]) {
[localObject performSelector:NSSelectorFromString(localAttribute)
withObject:[remoteObject valueForKey:remoteAttribute]];
}
}
return localObject;
}
- (NSArray *)objectsFromDictionaries:(NSArray *)array {
NSMutableArray *objects= [NSMutableArray array];
for (id object in array) {
[objects addObject:[self objectFromDictionary:object]];
}
return objects;
}
- (NSDictionary *)dictionaryFromObject:(id)object {
NSMutableDictionary *dict= nil;
if ([object respondsToSelector:@selector(toDictionary)]) {
dict= [object performSelector:@selector(toDictionary)];
} else {
dict = [NSMutableDictionary dictionary];
unsigned int outCount;
objc_property_t *propList = class_copyPropertyList([object class], &outCount);
NSString *propertyName;
for (int i = 0; i < outCount; i++) {
objc_property_t * prop = propList + i;
propertyName = [NSString stringWithCString:property_getName(*prop) encoding:NSUTF8StringEncoding];
if ([object respondsToSelector:NSSelectorFromString(propertyName)]) {
//NSString *type = [NSString stringWithCString:property_getAttributes(*prop) encoding:NSUTF8StringEncoding];
- [dict setValue:[object performSelector:NSSelectorFromString(propertyName)] forKey:propertyName];
+ [dict setValue:[object performSelector:NSSelectorFromString(propertyName)] forKey:[propertyName underscore]];
}
}
free(propList);
}
+ NSLog(@"%@", dict);
return dict;
}
- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects {
return nil;
}
- (NSString *)localClassnameFor:(NSString *)classname {
NSString *result = [classname camelize];
result = [result stringByReplacingCharactersInRange:NSMakeRange(0,1)
withString:[[result substringWithRange:NSMakeRange(0,1)] uppercaseString]];
if (self.localPrefix!=nil) {
result = [self.localPrefix stringByAppendingString:result];
}
return result;
}
+
- (NSString *)remoteClassnameFor:(NSString *)classname {
- return ;
+ return nil;
}
- (void) dealloc {
[_localPrefix release];
[super dealloc];
}
@end
diff --git a/src/CKEngine.h b/src/CKEngine.h
index 3013629..bd80219 100644
--- a/src/CKEngine.h
+++ b/src/CKEngine.h
@@ -1,18 +1,18 @@
//
// CKEngine.h
// CloudKit
//
// Created by Ludovic Galabru on 05/05/10.
// Copyright 2010 r. All rights reserved.
//
#import <UIKit/UIKit.h>
@protocol CKEngine
@required
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data;
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKHTTPBasicAuthenticationEngine.h b/src/CKHTTPBasicAuthenticationEngine.h
index f06578a..56d8e3b 100644
--- a/src/CKHTTPBasicAuthenticationEngine.h
+++ b/src/CKHTTPBasicAuthenticationEngine.h
@@ -1,22 +1,22 @@
//
// SHTTPBasicAuthenticationEngine.h
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKHTTPBasicAuthenticationEngine : NSObject<CKEngine> {
NSString *_username, *_password, *_basic_authorization;
}
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@property(nonatomic, retain) NSString *username, *password, *basic_authorization;
@end
diff --git a/src/CKHTTPBasicAuthenticationEngine.m b/src/CKHTTPBasicAuthenticationEngine.m
index 99450d2..0d00739 100644
--- a/src/CKHTTPBasicAuthenticationEngine.m
+++ b/src/CKHTTPBasicAuthenticationEngine.m
@@ -1,52 +1,53 @@
//
// SHTTPBasicAuthenticationEngine.m
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import "CKHTTPBasicAuthenticationEngine.h"
#import "NSData+CloudKitAdditions.h"
@interface CKHTTPBasicAuthenticationEngine (Private)
@end
@implementation CKHTTPBasicAuthenticationEngine
@synthesize
username= _username,
password= _password,
basic_authorization= _basic_authorization;
- (id)init {
self = [super init];
if (self != nil) {
}
return self;
}
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
if (self.basic_authorization == nil) {
NSData *encodedCredentials;
encodedCredentials= [[NSString stringWithFormat:@"%@:%@", self.username, self.password] dataUsingEncoding:NSASCIIStringEncoding];
- self.basic_authorization= [NSString stringWithFormat:@"Basic %@", [NSData base64forData:encodedCredentials]];
+ self.basic_authorization= [NSString stringWithFormat:@"Basic %@", [NSData base64stringforData:encodedCredentials]];
}
[*request addValue:self.basic_authorization forHTTPHeaderField:@"Authorization"];
}
+
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (void) dealloc {
[_username release];
[_password release];
[_basic_authorization release];
[super dealloc];
}
@end
diff --git a/src/CKJSONEngine.h b/src/CKJSONEngine.h
index 2941cae..2393454 100644
--- a/src/CKJSONEngine.h
+++ b/src/CKJSONEngine.h
@@ -1,19 +1,19 @@
//
// CKJSONEngine.h
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKJSONEngine : NSObject <CKEngine> {
}
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKJSONEngine.m b/src/CKJSONEngine.m
index f86dfc0..69ce87c 100644
--- a/src/CKJSONEngine.m
+++ b/src/CKJSONEngine.m
@@ -1,63 +1,67 @@
//
// CKJSONEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import "CKJSONEngine.h"
#import "TouchJSON/TouchJSON.h"
@interface CKJSONEngine (Private)
- (NSString *)serializeObject:(id)inObject;
- (NSString *)serializeArray:(NSArray *)inArray;
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary;
- (id)deserialize:(NSData *)inData error:(NSError **)outError;
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError;
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError;
@end
@implementation CKJSONEngine
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
NSString *path;
path= [[[*request URL] absoluteString] stringByAppendingString:@".json"];
[*request setURL:[NSURL URLWithString:path]];
[*request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
+ [*request addValue:@"application/json" forHTTPHeaderField:@"Accept"];
+ if ([*params valueForKey:@"HTTPBody"] != nil) {
+ [*request setHTTPBody:(NSData *)[[self serializeDictionary:[*params valueForKey:@"HTTPBody"]] dataUsingEncoding:NSUTF8StringEncoding]];
+ }
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
*data= [self deserialize:*data error:error];
}
- (NSString *)serializeObject:(id)inObject {
- return [[CJSONSerializer serializer] serializeObject:inObject];
+ return (NSString *)[[CJSONSerializer serializer] serializeObject:inObject];
}
- (NSString *)serializeArray:(NSArray *)inArray {
- return [[CJSONSerializer serializer] serializeArray:inArray];
+ return (NSString *)[[CJSONSerializer serializer] serializeArray:inArray];
}
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary {
- return [[CJSONSerializer serializer] serializeDictionary:inDictionary];
+ return (NSString *)[[CJSONSerializer serializer] serializeDictionary:inDictionary];
}
- (id)deserialize:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserialize:inData error:outError];
}
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsDictionary:inData error:outError];
}
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsArray:inData error:outError];
}
@end
diff --git a/src/CKOAuthEngine.h b/src/CKOAuthEngine.h
index c973821..9421211 100644
--- a/src/CKOAuthEngine.h
+++ b/src/CKOAuthEngine.h
@@ -1,30 +1,31 @@
//
// SOAuthEngine.h
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@class OAToken;
@class OAConsumer;
@protocol OASignatureProviding;
@interface CKOAuthEngine : NSObject<CKEngine> {
OAToken * _token;
OAConsumer * _consumer;
id <OASignatureProviding, NSObject> _signatureProvider;
}
-- (void)setupWithDictionary:(NSDictionary *)dictionary;
-- (NSMutableURLRequest *)signRequest:(NSMutableURLRequest *)request;
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
+
@property(nonatomic, retain) OAToken * token;
@property(nonatomic, retain) OAConsumer * consumer;
@property(nonatomic, retain) id <OASignatureProviding, NSObject> signatureProvider;
@end
diff --git a/src/CKOAuthEngine.m b/src/CKOAuthEngine.m
index dc4b46f..950dea6 100644
--- a/src/CKOAuthEngine.m
+++ b/src/CKOAuthEngine.m
@@ -1,36 +1,40 @@
//
// CKOAuthEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import "CKOAuthEngine.h"
#import "OAuthConsumer/OAuthConsumer.h"
#import "FBConnect/FBConnect.h"
@implementation CKOAuthEngine
@synthesize
token = _token;
@synthesize
consumer = _consumer;
@synthesize
signatureProvider = _signatureProvider;
-- (void)setupWithDictionary:(NSDictionary *)dictionary {
-
+
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
+}
+
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
+
- (void) dealloc {
[_token release];
[_consumer release];
[_signatureProvider release];
[super dealloc];
}
@end
diff --git a/src/CKRequestOperation.h b/src/CKRequestOperation.h
index 6bc4f4f..2a40f9f 100644
--- a/src/CKRequestOperation.h
+++ b/src/CKRequestOperation.h
@@ -1,33 +1,33 @@
//
// CKRequestOperation.h
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CKCloudKitManager;
@protocol CKRequestDelegate;
@interface CKRequestOperation : NSOperation {
NSMutableURLRequest * request;
- id<CKRequestDelegate> delegate;
+ NSObject<CKRequestDelegate> * delegate;
CKCloudKitManager *configuration;
- NSDictionary *params;
+ NSMutableDictionary *params;
NSData * data;
}
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andConfiguration:(CKCloudKitManager *)inConfiguration;
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
- andCongiguration:(CKCloudKitManager *)inConfiguration;
+ andConfiguration:(CKCloudKitManager *)inConfiguration;
@end
diff --git a/src/CKRequestOperation.m b/src/CKRequestOperation.m
index 69b2414..ad6803b 100644
--- a/src/CKRequestOperation.m
+++ b/src/CKRequestOperation.m
@@ -1,93 +1,97 @@
//
// CKRequestOperation.m
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import "CKRequestOperation.h"
#import "CKCloudKitManager.h"
+#import "CKRequestDelegate.h"
#import "CKEngine.h"
@implementation CKRequestOperation
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andConfiguration:(CKCloudKitManager *)inConfiguration {
self = [super init];
if (self != nil) {
request = [inRequest retain];
delegate = [inDelegate retain];
configuration= [inConfiguration retain];
- params= [inParams retain];
+ params= [[NSMutableDictionary alloc] initWithDictionary:inParams];
}
return self;
}
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
- andCongiguration:(CKCloudKitManager *)inConfiguration {
+ andConfiguration:(CKCloudKitManager *)inConfiguration {
CKRequestOperation *operation;
operation = [[CKRequestOperation alloc] initWithRequest:inRequest
params:inParams
delegate:inDelegate
andConfiguration:inConfiguration];
return [operation autorelease];
}
- (void)main {
NSError *error = nil;
NSArray *ordered_engines= [configuration ordered_engines];
for (id engine_name in ordered_engines) {
id<CKEngine> engine= [configuration engineForKey:engine_name];
- [engine processRequest:&request withParams:params];
+ [engine processRequest:&request withParams:¶ms];
}
+ NSLog(@"%@", [request URL]);
+ NSLog(@"%@", [request HTTPBody]);
+
NSHTTPURLResponse * response;
id rawData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
if (response.statusCode < 400 && error == nil) {
for (int index= [ordered_engines count]-1; index >= 0; index--) {
id<CKEngine> engine= [configuration engineForKey:[ordered_engines objectAtIndex:index]];
[engine processResponse:&response
withParams:params
data:&rawData
andError:&error];
}
} else if (response.statusCode > 400) {
//errors handling
}
if (error == nil) {
[self performSelectorOnMainThread:@selector(requestDidSucceedWithData:)
withObject:rawData
waitUntilDone:YES];
} else {
[self performSelectorOnMainThread:@selector(requestDidFailWithError:)
withObject:error
waitUntilDone:YES];
}
}
- (void)requestDidFailWithError:(NSError *)error {
[delegate request:request didFailWithError:error];
}
- (void)requestDidSucceedWithData:(id)response {
[delegate request:request didSucceedWithData:response];
}
- (void)dealloc {
[data release];
[request release];
[delegate release];
[super dealloc];
}
@end
diff --git a/src/CKRoutesEngine.h b/src/CKRoutesEngine.h
index 9ec7e4a..a7cb34b 100644
--- a/src/CKRoutesEngine.h
+++ b/src/CKRoutesEngine.h
@@ -1,21 +1,21 @@
//
// CKRoutesEngine.h
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKRoutesEngine : NSObject<CKEngine> {
NSDictionary *routes, *constants;
}
- (id)initWithRoutesURL:(NSURL *)URL;
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params;
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKRoutesEngine.m b/src/CKRoutesEngine.m
index 4fbd8ed..c60906d 100644
--- a/src/CKRoutesEngine.m
+++ b/src/CKRoutesEngine.m
@@ -1,122 +1,123 @@
//
// CKRoutesEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import "CKRoutesEngine.h"
#import "NSDictionary+CloudKitAdditions.h"
#import "NSMutableArray+CloudKitAdditions.h"
@interface CKRoutesEngine (Private)
- (NSURL *)URLForKey:(NSString *)key;
- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
- (NSString *)HTTPMethodForKey:(NSString *)key;
- (NSMutableURLRequest *)requestForKey:(NSString *)key;
- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
@end
@implementation CKRoutesEngine
- (id)init {
self = [super init];
if (self != nil) {
}
return self;
}
- (id)initWithRoutesURL:(NSURL *)URL {
self = [self init];
if (self != nil) {
NSDictionary* plist;
plist= [NSDictionary dictionaryWithContentsOfURL:URL];
routes= [[NSDictionary alloc] initWithDictionary:[plist valueForKey:@"routes"]];
constants= [[NSDictionary alloc] initWithDictionary:[plist valueForKey:@"constants"]];
}
return self;
}
-- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSMutableDictionary **)params {
NSString *keyURL= [[*request URL] absoluteString];
- NSURL *processedURL= [self URLForKey:keyURL withDictionary:params];
+ NSURL *processedURL= [self URLForKey:keyURL withDictionary:*params];
[*request setURL:processedURL];
NSString *method= [self HTTPMethodForKey:keyURL];
if (method != nil) {
[*request setHTTPMethod:method];
}
}
- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (NSURL *)URLForKey:(NSString *)key {
return [self URLForKey:key withDictionary:nil];
}
- (NSString *)HTTPMethodForKey:(NSString *)key {
NSString *method;
method= [[routes valueForKey:key] valueForKey:@"method"];
return method;
}
- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants {
NSString *rawPath, *processedPath;
NSDictionary *temporaryConstants;
NSURL *processedURL;
+
temporaryConstants= [NSDictionary dictionaryWithDictionary:constants
andDictionary:newConstants];
rawPath= [[routes valueForKey:key] valueForKey:@"url"];
NSMutableArray *rawComponents= [NSMutableArray arrayWithArray:[rawPath componentsSeparatedByString:@"/"]];
[rawComponents removeEmptyStrings];
NSMutableArray *processedComponents= [NSMutableArray array];
for (id rawComponent in rawComponents) {
NSArray *rawSubComponents= [rawComponent componentsSeparatedByString:@"."];
NSMutableArray *processedSubComponents= [NSMutableArray array];
for (id rawSubComponent in rawSubComponents) {
if (![rawSubComponent isEqualToString:@""]) {
if ([rawSubComponent characterAtIndex:0] == ':') {
NSString *processedSubComponent= [temporaryConstants valueForKey:[rawSubComponent substringFromIndex:1]];
if (processedSubComponent != nil) {
[processedSubComponents addObject:processedSubComponent];
}
} else {
[processedSubComponents addObject:rawSubComponent];
}
}
}
[processedComponents removeEmptyStrings];
[processedComponents addObject:[processedSubComponents componentsJoinedByString:@"."]];
}
processedPath= [processedComponents componentsJoinedByString:@"/"];
processedURL= [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", processedPath]];
return processedURL;
}
- (NSMutableURLRequest *)requestForKey:(NSString *)key {
return [self requestForKey:key withDictionary:nil];
}
- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants {
NSMutableURLRequest *request;
request= [[NSMutableURLRequest alloc] initWithURL:[self URLForKey:key
withDictionary:newConstants]];
NSString *method;
method= [self HTTPMethodForKey:key];
if (method != nil) {
[request setHTTPMethod:method];
}
return request;
}
- (void) dealloc {
[super dealloc];
}
@end
diff --git a/src/CloudKit/CloudKit.h b/src/CloudKit/CloudKit.h
index 58d13fd..31a5e67 100644
--- a/src/CloudKit/CloudKit.h
+++ b/src/CloudKit/CloudKit.h
@@ -1,21 +1,21 @@
//
// CloudKit.h
// CloudKit
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import "CKCloudKitManager.h"
#import "CKRequestManager.h"
#import "CKRequestOperation.h"
#import "CKHTTPBasicAuthenticationEngine.h"
-#import "CKOAuthEngine.h"
+//#import "CKOAuthEngine.h"
#import "CKJSONEngine.h"
#import "CKRoutesEngine.h"
#import "CKDictionarizerEngine.h"
#import "CKEngine.h"
#import "CKRequestDelegate.h"
\ No newline at end of file
diff --git a/src/NSData+CloudKitAdditions.h b/src/NSData+CloudKitAdditions.h
index 477db4a..fa3d13f 100644
--- a/src/NSData+CloudKitAdditions.h
+++ b/src/NSData+CloudKitAdditions.h
@@ -1,16 +1,16 @@
//
// NSData+ScrumersAdditions.h
// CloudKit
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSData (CloudKit)
-+ (NSString*)base64forData:(NSData*)theData;
++ (NSString*)base64stringforData:(NSData*)theData;
@end
diff --git a/src/NSData+CloudKitAdditions.m b/src/NSData+CloudKitAdditions.m
index 47f99e6..b358e8d 100644
--- a/src/NSData+CloudKitAdditions.m
+++ b/src/NSData+CloudKitAdditions.m
@@ -1,48 +1,48 @@
//
// NSData+ScrumersAdditions.m
// CloudKit
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import "NSData+CloudKitAdditions.h"
@implementation NSData (CloudKit)
// From: http://www.cocoadev.com/index.pl?BaseSixtyFour
-+ (NSString*)base64forData:(NSData*)theData {
++ (NSString*)base64stringforData:(NSData*)theData {
const uint8_t* input = (const uint8_t*)[theData bytes];
NSInteger length = [theData length];
static char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
NSMutableData* data = [NSMutableData dataWithLength:((length + 2) / 3) * 4];
uint8_t* output = (uint8_t*)data.mutableBytes;
NSInteger i;
for (i=0; i < length; i += 3) {
NSInteger value = 0;
NSInteger j;
for (j = i; j < (i + 3); j++) {
value <<= 8;
if (j < length) {
value |= (0xFF & input[j]);
}
}
NSInteger theIndex = (i / 3) * 4;
output[theIndex + 0] = table[(value >> 18) & 0x3F];
output[theIndex + 1] = table[(value >> 12) & 0x3F];
output[theIndex + 2] = (i + 1) < length ? table[(value >> 6) & 0x3F] : '=';
output[theIndex + 3] = (i + 2) < length ? table[(value >> 0) & 0x3F] : '=';
}
return [[[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding] autorelease];
}
@end
diff --git a/src/NSDictionary+CloudKitAdditions.m b/src/NSDictionary+CloudKitAdditions.m
index ec9f7b9..800dc59 100644
--- a/src/NSDictionary+CloudKitAdditions.m
+++ b/src/NSDictionary+CloudKitAdditions.m
@@ -1,29 +1,29 @@
//
// NSDictionary+CloudKitAdditions.m
// CloudKit
//
// Created by Ludovic Galabru on 19/05/10.
// Copyright 2010 scrumers. All rights reserved.
//
#import "NSDictionary+CloudKitAdditions.h"
@implementation NSDictionary (CloudKit)
+ (NSDictionary *)dictionaryWithDictionary:(NSDictionary *)dict1 andDictionary:(NSDictionary *)dict2 {
NSMutableDictionary *mergedDict;
- mergedDict= [NSDictionary dictionaryWithDictionary:dict1];
+ mergedDict= [NSMutableDictionary dictionaryWithDictionary:dict1];
for (id key in [dict2 allKeys]) {
id value;
if ([dict2 valueForKey:key] == nil || [dict2 valueForKey:key] == [NSNull null]) {
value= @"";
} else {
value= [dict2 valueForKey:key];
}
[mergedDict setValue:value forKey:key];
}
return mergedDict;
}
@end
|
scrumers/CoreCloud
|
55b0d098e58736bf6e2fb36b8ca489c87528e7e8
|
Submodules modified
|
diff --git a/.gitmodules b/.gitmodules
index 74b9d7f..16df91f 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,9 +1,9 @@
[submodule "lib/oauth-objc"]
path = lib/oauth-objc
url = [email protected]:scrumers/oauth-objc.git
[submodule "lib/fbconnect-objc"]
path = lib/fbconnect-objc
url = [email protected]:scrumers/fbconnect-objc.git
-[submodule "lib/YAJL-objc"]
- path = lib/YAJL-objc
- url = [email protected]:scrumers/YAJL-objc.git
+[submodule "lib/touchjson-objc"]
+ path = lib/touchjson-objc
+ url = [email protected]:scrumers/touchjson-objc.git
|
scrumers/CoreCloud
|
253a63d089c5eb6b437a34ad66d8e7d7e7cf931f
|
GET requests are working
|
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
index ab2879f..946a324 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.pbxuser
@@ -1,430 +1,427 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
activeBuildConfigurationName = Debug;
activeTarget = D2AAC07D0554694100DB518D /* TouchJSON */;
addToTargets = (
D2AAC07D0554694100DB518D /* TouchJSON */,
);
codeSenseManager = 431C7D3511A4025F004F2B13 /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
10,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 295961726;
- PBXWorkspaceStateSaveDate = 295961726;
+ PBXPerProjectTemplateStateSaveDate = 296059609;
+ PBXWorkspaceStateSaveDate = 296059609;
};
perUserProjectItems = {
431C7D8711A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8711A4042B004F2B13 /* PBXTextBookmark */;
431C7D8811A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8811A4042B004F2B13 /* PBXTextBookmark */;
431C7D8911A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8911A4042B004F2B13 /* PBXTextBookmark */;
- 431C7D8A11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8A11A4042B004F2B13 /* PBXTextBookmark */;
431C7D8C11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8C11A4042B004F2B13 /* PBXTextBookmark */;
431C7D8D11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8D11A4042B004F2B13 /* PBXTextBookmark */;
431C7D8E11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8E11A4042B004F2B13 /* PBXTextBookmark */;
- 431C7D8F11A4042B004F2B13 /* PBXTextBookmark */ = 431C7D8F11A4042B004F2B13 /* PBXTextBookmark */;
431C7D9011A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9011A4042B004F2B13 /* PBXTextBookmark */;
431C7D9111A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9111A4042B004F2B13 /* PBXTextBookmark */;
431C7D9211A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9211A4042B004F2B13 /* PBXTextBookmark */;
431C7D9311A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9311A4042B004F2B13 /* PBXTextBookmark */;
431C7D9411A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9411A4042B004F2B13 /* PBXTextBookmark */;
431C7D9511A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9511A4042B004F2B13 /* PBXTextBookmark */;
431C7D9611A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9611A4042B004F2B13 /* PBXTextBookmark */;
431C7D9711A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9711A4042B004F2B13 /* PBXTextBookmark */;
431C7D9811A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9811A4042B004F2B13 /* PBXTextBookmark */;
431C7D9911A4042B004F2B13 /* PBXTextBookmark */ = 431C7D9911A4042B004F2B13 /* PBXTextBookmark */;
431C7DC711A405A8004F2B13 /* PBXTextBookmark */ = 431C7DC711A405A8004F2B13 /* PBXTextBookmark */;
- 431C7DC811A405A8004F2B13 /* PBXTextBookmark */ = 431C7DC811A405A8004F2B13 /* PBXTextBookmark */;
- 431C7DC911A405A8004F2B13 /* PBXTextBookmark */ = 431C7DC911A405A8004F2B13 /* PBXTextBookmark */;
+ 438E39CB11A5864B0028F47F /* PBXTextBookmark */ = 438E39CB11A5864B0028F47F /* PBXTextBookmark */;
+ 438E39CC11A5864B0028F47F /* PBXTextBookmark */ = 438E39CC11A5864B0028F47F /* PBXTextBookmark */;
+ 438E39CD11A5864B0028F47F /* PBXTextBookmark */ = 438E39CD11A5864B0028F47F /* PBXTextBookmark */;
+ 438E39CE11A5864B0028F47F /* PBXTextBookmark */ = 438E39CE11A5864B0028F47F /* PBXTextBookmark */;
};
sourceControlManager = 431C7D3411A4025F004F2B13 /* Source Control */;
userBuildSettings = {
};
};
431C7D3411A4025F004F2B13 /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
431C7D3511A4025F004F2B13 /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
431C7D4111A402BC004F2B13 /* CDataScanner.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 884}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1860}";
};
};
431C7D4211A402BC004F2B13 /* CDataScanner.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 3198}}";
sepNavSelRange = "{1247, 61}";
sepNavVisRange = "{0, 1760}";
};
};
431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1453}";
};
};
431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1053}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{1220, 1320}";
};
};
431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1402}";
};
};
431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1132, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1841}";
};
};
431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1432}";
};
};
431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1555}";
};
};
431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{759, 0}";
sepNavVisRange = "{0, 1622}";
};
};
431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1417}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1836}";
};
};
431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1814}";
};
};
431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 2886}}";
- sepNavSelRange = "{1256, 65}";
- sepNavVisRange = "{0, 1902}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 3016}}";
+ sepNavSelRange = "{2802, 19}";
+ sepNavVisRange = "{1967, 908}";
};
};
431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 598}}";
sepNavSelRange = "{1394, 17}";
- sepNavVisRange = "{0, 1665}";
+ sepNavVisRange = "{0, 1428}";
};
};
431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1170}}";
sepNavSelRange = "{1254, 80}";
sepNavVisRange = "{0, 1910}";
};
};
431C7D5311A402BC004F2B13 /* CJSONSerializer.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1566, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1927}";
};
};
431C7D5411A402BC004F2B13 /* CJSONSerializer.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 1027}}";
sepNavSelRange = "{1252, 60}";
sepNavVisRange = "{0, 1612}";
};
};
431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{0, 1449}";
+ sepNavIntBoundsRect = "{{0, 0}, {1094, 533}}";
+ sepNavSelRange = "{765, 0}";
+ sepNavVisRange = "{89, 1360}";
};
};
431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 715}}";
sepNavSelRange = "{1254, 32}";
sepNavVisRange = "{0, 1531}";
};
};
431C7D8211A4037C004F2B13 /* TouchJSON.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{369, 0}";
sepNavVisRange = "{0, 369}";
};
};
431C7D8711A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4111A402BC004F2B13 /* CDataScanner.h */;
name = "CDataScanner.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1860;
vrLoc = 0;
};
431C7D8811A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4211A402BC004F2B13 /* CDataScanner.m */;
name = "CDataScanner.m: 30";
rLen = 61;
rLoc = 1247;
rType = 0;
vrLen = 1760;
vrLoc = 0;
};
431C7D8911A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4D11A402BC004F2B13 /* CJSONDataSerializer.h */;
name = "CJSONDataSerializer.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1814;
vrLoc = 0;
};
- 431C7D8A11A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */;
- name = "CJSONDataSerializer.m: 30";
- rLen = 65;
- rLoc = 1256;
- rType = 0;
- vrLen = 1902;
- vrLoc = 0;
- };
431C7D8C11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5011A402BC004F2B13 /* CJSONDeserializer.m */;
name = "CJSONDeserializer.m: 30";
rLen = 80;
rLoc = 1254;
rType = 0;
vrLen = 1910;
vrLoc = 0;
};
431C7D8D11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5311A402BC004F2B13 /* CJSONSerializer.h */;
name = "CJSONSerializer.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1927;
vrLoc = 0;
};
431C7D8E11A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5411A402BC004F2B13 /* CJSONSerializer.m */;
name = "CJSONSerializer.m: 30";
rLen = 60;
rLoc = 1252;
rType = 0;
vrLen = 1612;
vrLoc = 0;
};
- 431C7D8F11A4042B004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
- name = "CSerializedJSONData.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1449;
- vrLoc = 0;
- };
431C7D9011A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D5611A402BC004F2B13 /* CSerializedJSONData.m */;
name = "CSerializedJSONData.m: 30";
rLen = 32;
rLoc = 1254;
rType = 0;
vrLen = 1531;
vrLoc = 0;
};
431C7D9111A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */;
name = "TouchJSON_Prefix.pch: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 188;
vrLoc = 0;
};
431C7D9211A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D8211A4037C004F2B13 /* TouchJSON.h */;
name = "TouchJSON.h: 17";
rLen = 0;
rLoc = 369;
rType = 0;
vrLen = 369;
vrLoc = 0;
};
431C7D9311A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4411A402BC004F2B13 /* CDataScanner_Extensions.h */;
name = "CDataScanner_Extensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1453;
vrLoc = 0;
};
431C7D9411A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4511A402BC004F2B13 /* CDataScanner_Extensions.m */;
name = "CDataScanner_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1320;
vrLoc = 1220;
};
431C7D9511A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4611A402BC004F2B13 /* NSCharacterSet_Extensions.h */;
name = "NSCharacterSet_Extensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1402;
vrLoc = 0;
};
431C7D9611A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4711A402BC004F2B13 /* NSCharacterSet_Extensions.m */;
name = "NSCharacterSet_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1841;
vrLoc = 0;
};
431C7D9711A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4811A402BC004F2B13 /* NSDictionary_JSONExtensions.h */;
name = "NSDictionary_JSONExtensions.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1432;
vrLoc = 0;
};
431C7D9811A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4911A402BC004F2B13 /* NSDictionary_JSONExtensions.m */;
name = "NSDictionary_JSONExtensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1555;
vrLoc = 0;
};
431C7D9911A4042B004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4B11A402BC004F2B13 /* NSScanner_Extensions.m */;
name = "NSScanner_Extensions.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1836;
vrLoc = 0;
};
431C7DC711A405A8004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4A11A402BC004F2B13 /* NSScanner_Extensions.h */;
name = "NSScanner_Extensions.h: 19";
rLen = 0;
rLoc = 759;
rType = 0;
vrLen = 1622;
vrLoc = 0;
};
- 431C7DC811A405A8004F2B13 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */;
- name = "CJSONDeserializer.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1665;
- vrLoc = 0;
- };
- 431C7DC911A405A8004F2B13 /* PBXTextBookmark */ = {
+ 438E39CB11A5864B0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7D4F11A402BC004F2B13 /* CJSONDeserializer.h */;
name = "CJSONDeserializer.h: 34";
rLen = 17;
rLoc = 1394;
rType = 0;
- vrLen = 1665;
+ vrLen = 1428;
vrLoc = 0;
};
+ 438E39CC11A5864B0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D4E11A402BC004F2B13 /* CJSONDataSerializer.m */;
+ name = "CJSONDataSerializer.m: 91";
+ rLen = 19;
+ rLoc = 2802;
+ rType = 0;
+ vrLen = 908;
+ vrLoc = 1967;
+ };
+ 438E39CD11A5864B0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
+ rLen = 19;
+ rLoc = 1300;
+ rType = 0;
+ };
+ 438E39CE11A5864B0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 431C7D5511A402BC004F2B13 /* CSerializedJSONData.h */;
+ name = "CSerializedJSONData.h: 20";
+ rLen = 0;
+ rLoc = 765;
+ rType = 0;
+ vrLen = 1360;
+ vrLoc = 89;
+ };
AA747D9E0F9514B9006C5449 /* TouchJSON_Prefix.pch */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1094, 709}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 188}";
};
};
D2AAC07D0554694100DB518D /* TouchJSON */ = {
activeExec = 0;
};
}
diff --git a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3 b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
index a6cc862..1b64653 100644
--- a/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
+++ b/lib/touchjson-objc/src/TouchJSON.xcodeproj/Ludovic.perspectivev3
@@ -1,1259 +1,1186 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
- <array>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusErrorsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusErrorsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusWarningsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusWarningsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- <dict>
- <key>XCObserverAutoDisconnectKey</key>
- <true/>
- <key>XCObserverDefintionKey</key>
- <dict>
- <key>PBXStatusAnalyzerResultsKey</key>
- <integer>0</integer>
- </dict>
- <key>XCObserverFactoryKey</key>
- <string>XCPerspectivesSpecificationIdentifier</string>
- <key>XCObserverGUIDKey</key>
- <string>XCObserverProjectIdentifier</string>
- <key>XCObserverNotificationKey</key>
- <string>PBXStatusBuildStateMessageNotification</string>
- <key>XCObserverTargetKey</key>
- <string>XCMainBuildResultsModuleGUID</string>
- <key>XCObserverTriggerKey</key>
- <string>awakenModuleWithObserver:</string>
- <key>XCObserverValidationKey</key>
- <dict>
- <key>PBXStatusAnalyzerResultsKey</key>
- <integer>2</integer>
- </dict>
- </dict>
- </array>
+ <array/>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
<real>241</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>431C7D4311A402BC004F2B13</string>
<string>431C7D4C11A402BC004F2B13</string>
<string>32C88DFF0371C24200C91783</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>16</integer>
<integer>13</integer>
<integer>1</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {263, 728}}</string>
+ <string>{{0, 0}, {263, 691}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {280, 746}}</string>
+ <string>{{0, 0}, {280, 709}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
<real>241</real>
</array>
<key>RubberWindowFrame</key>
- <string>135 105 1440 787 0 0 1680 1028 </string>
+ <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
<string>280pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CJSONDeserializer.h</string>
+ <string>CSerializedJSONData.h</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CJSONDeserializer.h</string>
+ <string>CSerializedJSONData.h</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>431C7DC911A405A8004F2B13</string>
+ <string>438E39CE11A5864B0028F47F</string>
<key>history</key>
<array>
<string>431C7D8711A4042B004F2B13</string>
<string>431C7D8811A4042B004F2B13</string>
<string>431C7D8911A4042B004F2B13</string>
- <string>431C7D8A11A4042B004F2B13</string>
<string>431C7D8C11A4042B004F2B13</string>
<string>431C7D8D11A4042B004F2B13</string>
<string>431C7D8E11A4042B004F2B13</string>
- <string>431C7D8F11A4042B004F2B13</string>
<string>431C7D9011A4042B004F2B13</string>
<string>431C7D9111A4042B004F2B13</string>
<string>431C7D9211A4042B004F2B13</string>
<string>431C7D9311A4042B004F2B13</string>
<string>431C7D9411A4042B004F2B13</string>
<string>431C7D9511A4042B004F2B13</string>
<string>431C7D9611A4042B004F2B13</string>
<string>431C7D9711A4042B004F2B13</string>
<string>431C7D9811A4042B004F2B13</string>
<string>431C7D9911A4042B004F2B13</string>
<string>431C7DC711A405A8004F2B13</string>
- <string>431C7DC811A405A8004F2B13</string>
+ <string>438E39CB11A5864B0028F47F</string>
+ <string>438E39CC11A5864B0028F47F</string>
+ <string>438E39CD11A5864B0028F47F</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1155, 741}}</string>
+ <string>{{0, 0}, {1155, 493}}</string>
<key>RubberWindowFrame</key>
- <string>135 105 1440 787 0 0 1680 1028 </string>
+ <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>741pt</string>
+ <string>493pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>0pt</string>
+ <string>211pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1155, -27}}</string>
- <key>RubberWindowFrame</key>
- <string>135 105 1440 787 0 0 1680 1028 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1155, 205}}</string>
+ <string>{{10, 27}, {1155, 184}}</string>
+ <key>RubberWindowFrame</key>
+ <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 31}, {603, 297}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
- <integer>1024</integer>
+ <integer>1021</integer>
<key>XCBuildResultsTrigger_Open</key>
- <integer>1013</integer>
+ <integer>1011</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1155, 205}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
<string>1155pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
- <string>431C7DCA11A405A8004F2B13</string>
+ <string>438E39CF11A5864B0028F47F</string>
<string>1CA23ED40692098700951B8B</string>
- <string>431C7DCB11A405A8004F2B13</string>
+ <string>438E39D011A5864B0028F47F</string>
<string>433104F70F1280740091B39C</string>
- <string>431C7DCC11A405A8004F2B13</string>
+ <string>438E39D111A5864B0028F47F</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.ide.XCBreakpointsToolbarItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1440, 218}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {720, 252}}</string>
<string>{{720, 0}, {720, 252}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1440, 252}}</string>
<string>{{0, 252}, {1440, 253}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 223}, {1440, 505}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
<string>{{720, 0}, {720, 252}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>505pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
<string>436AD84810306A210068D6C9</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
<string>436AD84910306A210068D6C9</string>
<string>436AD84A10306A210068D6C9</string>
<string>436AD84B10306A210068D6C9</string>
<string>436AD84C10306A210068D6C9</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>295962024.31545103</real>
+ <real>0.0</real>
<key>ToolbarDisplayMode</key>
- <integer>2</integer>
+ <integer>1</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>/Volumes/Sprints mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/TouchJSON.xcodeproj</string>
+ <string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/touchjson-objc/src/TouchJSON.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>135 105 1440 787 0 0 1680 1028 </string>
+ <string>0 128 1440 750 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.snapshots</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Snapshots</string>
<key>ServiceClasses</key>
<array>
<string>XCSnapshotModule</string>
</array>
<key>StatusbarIsVisible</key>
<string>Yes</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.snapshots</string>
<key>WindowString</key>
<string>315 824 300 550 0 0 1440 878 </string>
<key>WindowToolIsVisible</key>
<string>Yes</string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.debuggerConsole</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAAC065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {700, 358}}</string>
<key>RubberWindowFrame</key>
<string>149 87 700 400 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Proportion</key>
<string>358pt</string>
</dict>
</array>
<key>Name</key>
<string>Debugger Console</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugCLIModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D5B069F1CE1000CFCEE</string>
<string>1C530D5C069F1CE1000CFCEE</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
<string>149 87 440 400 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D5B069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.scm</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB2065D492600B07095</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1C78EAB3065D492600B07095</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {452, 0}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>0pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052920623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>SCM</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>ConsoleFrame</key>
<string>{{0, 259}, {452, 0}}</string>
<key>Frame</key>
<string>{{0, 7}, {452, 259}}</string>
<key>RubberWindowFrame</key>
<string>743 379 452 308 0 0 1280 1002 </string>
<key>TableConfiguration</key>
<array>
<string>Status</string>
<real>30</real>
<string>FileName</string>
<real>199</real>
<string>Path</string>
<real>197.09500122070312</real>
</array>
<key>TableFrame</key>
<string>{{0, 0}, {452, 250}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Proportion</key>
<string>262pt</string>
</dict>
</array>
<key>Proportion</key>
<string>266pt</string>
</dict>
</array>
<key>Name</key>
<string>SCM</string>
<key>ServiceClasses</key>
<array>
<string>PBXCVSModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAB4065D492600B07095</string>
<string>1C78EAB5065D492600B07095</string>
<string>1C78EAB2065D492600B07095</string>
<string>1CD052920623707200166675</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.scmV3</string>
<key>WindowString</key>
<string>743 379 452 308 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.breakpoints</string>
<key>IsVertical</key>
<integer>0</integer>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CE0B1FE06471DED0097A5F4</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>no</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>168</real>
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
index 2558151..aaef7e6 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
+++ b/platform/iPhone/CloudKit.xcodeproj/Ludovic.pbxuser
@@ -1,760 +1,674 @@
// !$*UTF8*$!
{
0867D690FE84028FC02AAC07 /* Project object */ = {
activeBuildConfigurationName = Debug;
activeSDKPreference = iphonesimulator3.2;
activeTarget = D2AAC07D0554694100DB518D /* CloudKit */;
addToTargets = (
D2AAC07D0554694100DB518D /* CloudKit */,
);
breakpoints = (
);
codeSenseManager = 43A20CA0116DBEAB00BA930A /* Code sense */;
perUserDictionary = {
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
930,
20,
48,
43,
43,
20,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
PBXFileDataSource_Target_ColumnID,
);
};
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
10,
60,
20,
48,
43,
43,
);
PBXFileTableDataSourceColumnsKey = (
PBXFileDataSource_FiletypeID,
PBXFileDataSource_Filename_ColumnID,
PBXTargetDataSource_PrimaryAttribute,
PBXFileDataSource_Built_ColumnID,
PBXFileDataSource_ObjectSize_ColumnID,
PBXFileDataSource_Errors_ColumnID,
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 296053573;
PBXWorkspaceStateSaveDate = 296053573;
};
perUserProjectItems = {
- 430538CB11A531EF003C39C8 = 430538CB11A531EF003C39C8 /* PBXTextBookmark */;
- 430538CC11A531EF003C39C8 = 430538CC11A531EF003C39C8 /* PBXTextBookmark */;
- 4305392211A5366B003C39C8 = 4305392211A5366B003C39C8 /* PBXTextBookmark */;
- 4305392311A5366B003C39C8 = 4305392311A5366B003C39C8 /* PBXTextBookmark */;
- 43053A1A11A55864003C39C8 = 43053A1A11A55864003C39C8 /* PBXTextBookmark */;
- 43053A4511A55F2B003C39C8 = 43053A4511A55F2B003C39C8 /* PBXTextBookmark */;
- 43053A4611A55F2B003C39C8 = 43053A4611A55F2B003C39C8 /* PBXTextBookmark */;
- 43053A4911A55F2B003C39C8 = 43053A4911A55F2B003C39C8 /* PBXTextBookmark */;
- 43053A6D11A560A0003C39C8 = 43053A6D11A560A0003C39C8 /* PBXTextBookmark */;
- 43053A7F11A567AA003C39C8 = 43053A7F11A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8011A567AA003C39C8 = 43053A8011A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8111A567AA003C39C8 = 43053A8111A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8211A567AA003C39C8 = 43053A8211A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8311A567AA003C39C8 = 43053A8311A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8411A567AA003C39C8 = 43053A8411A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8611A567AA003C39C8 = 43053A8611A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8711A567AA003C39C8 = 43053A8711A567AA003C39C8 /* PBXTextBookmark */;
- 43053A8811A567AA003C39C8 = 43053A8811A567AA003C39C8 /* PBXTextBookmark */;
- 43053AA111A5694D003C39C8 = 43053AA111A5694D003C39C8 /* PBXTextBookmark */;
- 43053AA211A5694D003C39C8 = 43053AA211A5694D003C39C8 /* PBXTextBookmark */;
- 43053AB511A56AAA003C39C8 = 43053AB511A56AAA003C39C8 /* PBXTextBookmark */;
- 43053AB611A56AAA003C39C8 = 43053AB611A56AAA003C39C8 /* PBXTextBookmark */;
- 431C7F6011A4200A004F2B13 = 431C7F6011A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6111A4200A004F2B13 = 431C7F6111A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6211A4200A004F2B13 = 431C7F6211A4200A004F2B13 /* PBXTextBookmark */;
- 431C7F6311A4200A004F2B13 = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
- 433483CC1192BF28008295CA = 433483CC1192BF28008295CA /* PBXTextBookmark */;
- 4334840E1192C0C9008295CA = 4334840E1192C0C9008295CA /* PBXTextBookmark */;
- 438E395A11A56B620028F47F /* PBXTextBookmark */ = 438E395A11A56B620028F47F /* PBXTextBookmark */;
- 438E395B11A56B620028F47F /* PBXTextBookmark */ = 438E395B11A56B620028F47F /* PBXTextBookmark */;
- 438E395C11A56B620028F47F /* PBXTextBookmark */ = 438E395C11A56B620028F47F /* PBXTextBookmark */;
- 438E396011A56BC40028F47F /* PBXTextBookmark */ = 438E396011A56BC40028F47F /* PBXTextBookmark */;
- 438E396D11A56CD60028F47F /* PBXTextBookmark */ = 438E396D11A56CD60028F47F /* PBXTextBookmark */;
- 438E396E11A56CD60028F47F /* PBXTextBookmark */ = 438E396E11A56CD60028F47F /* PBXTextBookmark */;
- 438E396F11A56CD60028F47F /* PBXTextBookmark */ = 438E396F11A56CD60028F47F /* PBXTextBookmark */;
- 438E397511A56CDF0028F47F /* PBXTextBookmark */ = 438E397511A56CDF0028F47F /* PBXTextBookmark */;
- 438E397D11A56D2B0028F47F /* PBXTextBookmark */ = 438E397D11A56D2B0028F47F /* PBXTextBookmark */;
- 438E397E11A56DC60028F47F /* PBXTextBookmark */ = 438E397E11A56DC60028F47F /* PBXTextBookmark */;
- 438E397F11A56DC60028F47F /* PBXTextBookmark */ = 438E397F11A56DC60028F47F /* PBXTextBookmark */;
- 438E398011A56DC60028F47F /* PBXTextBookmark */ = 438E398011A56DC60028F47F /* PBXTextBookmark */;
- 438E398111A56DD60028F47F /* PBXTextBookmark */ = 438E398111A56DD60028F47F /* PBXTextBookmark */;
- 438E398411A56DF70028F47F /* PBXTextBookmark */ = 438E398411A56DF70028F47F /* PBXTextBookmark */;
- 438E398711A56E010028F47F /* PBXTextBookmark */ = 438E398711A56E010028F47F /* PBXTextBookmark */;
- 43A20EB5116DD04D00BA930A = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
+ 430538CB11A531EF003C39C8 /* PBXTextBookmark */ = 430538CB11A531EF003C39C8 /* PBXTextBookmark */;
+ 430538CC11A531EF003C39C8 /* PBXTextBookmark */ = 430538CC11A531EF003C39C8 /* PBXTextBookmark */;
+ 4305392211A5366B003C39C8 /* PBXTextBookmark */ = 4305392211A5366B003C39C8 /* PBXTextBookmark */;
+ 4305392311A5366B003C39C8 /* PBXTextBookmark */ = 4305392311A5366B003C39C8 /* PBXTextBookmark */;
+ 43053A4511A55F2B003C39C8 /* PBXTextBookmark */ = 43053A4511A55F2B003C39C8 /* PBXTextBookmark */;
+ 43053A4611A55F2B003C39C8 /* PBXTextBookmark */ = 43053A4611A55F2B003C39C8 /* PBXTextBookmark */;
+ 43053A4911A55F2B003C39C8 /* PBXTextBookmark */ = 43053A4911A55F2B003C39C8 /* PBXTextBookmark */;
+ 43053A8011A567AA003C39C8 /* PBXTextBookmark */ = 43053A8011A567AA003C39C8 /* PBXTextBookmark */;
+ 431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6011A4200A004F2B13 /* PBXTextBookmark */;
+ 431C7F6111A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6111A4200A004F2B13 /* PBXTextBookmark */;
+ 431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6211A4200A004F2B13 /* PBXTextBookmark */;
+ 431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = 431C7F6311A4200A004F2B13 /* PBXTextBookmark */;
+ 433483CC1192BF28008295CA /* PBXTextBookmark */ = 433483CC1192BF28008295CA /* PBXTextBookmark */;
+ 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1511A58C1F0028F47F /* PBXTextBookmark */;
+ 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = 438E3A1711A58C1F0028F47F /* PBXTextBookmark */;
+ 438E3A3911A58ECC0028F47F /* PBXTextBookmark */ = 438E3A3911A58ECC0028F47F /* PBXTextBookmark */;
+ 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = 438E3A9211A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9311A599EE0028F47F /* PBXTextBookmark */ = 438E3A9311A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9411A599EE0028F47F /* PBXTextBookmark */ = 438E3A9411A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9511A599EE0028F47F /* PBXTextBookmark */ = 438E3A9511A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9611A599EE0028F47F /* PBXTextBookmark */ = 438E3A9611A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9711A599EE0028F47F /* PBXTextBookmark */ = 438E3A9711A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9811A599EE0028F47F /* PBXTextBookmark */ = 438E3A9811A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9911A599EE0028F47F /* PBXTextBookmark */ = 438E3A9911A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9A11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9A11A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9B11A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9D11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9D11A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9E11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9E11A599EE0028F47F /* PBXTextBookmark */;
+ 438E3A9F11A599EE0028F47F /* PBXTextBookmark */ = 438E3A9F11A599EE0028F47F /* PBXTextBookmark */;
+ 438E3AA011A599EE0028F47F /* PBXTextBookmark */ = 438E3AA011A599EE0028F47F /* PBXTextBookmark */;
+ 438E3AA111A599EE0028F47F /* PBXTextBookmark */ = 438E3AA111A599EE0028F47F /* PBXTextBookmark */;
+ 43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = 43A20EB5116DD04D00BA930A /* PBXTextBookmark */;
};
sourceControlManager = 43A20C9F116DBEAB00BA930A /* Source Control */;
userBuildSettings = {
};
};
430538CB11A531EF003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */;
name = "NSDictionary+CloudKitAdditions.h: 14";
rLen = 0;
rLoc = 296;
rType = 0;
vrLen = 334;
vrLoc = 0;
};
430538CC11A531EF003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */;
name = "NSDictionary+CloudKitAdditions.m: 24";
rLen = 0;
rLoc = 633;
rType = 0;
vrLen = 706;
vrLoc = 0;
};
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{219, 28}";
sepNavVisRange = "{0, 253}";
};
};
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{253, 18}";
sepNavVisRange = "{0, 342}";
};
};
4305392211A5366B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */;
name = "NSMutableArray+CloudKitAdditions.h: 14";
rLen = 28;
rLoc = 219;
rType = 0;
vrLen = 253;
vrLoc = 0;
};
4305392311A5366B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */;
name = "NSMutableArray+CloudKitAdditions.m: 14";
rLen = 18;
rLoc = 253;
rType = 0;
vrLen = 342;
vrLoc = 0;
};
43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {3281, 1066}}";
+ sepNavIntBoundsRect = "{{0, 0}, {3281, 1053}}";
sepNavSelRange = "{234, 0}";
- sepNavVisRange = "{0, 2073}";
+ sepNavVisRange = "{0, 439}";
};
};
- 43053A1A11A55864003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 23";
- rLen = 0;
- rLoc = 841;
- rType = 0;
- vrLen = 1050;
- vrLoc = 0;
- };
43053A4511A55F2B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */;
name = "CKRequestManager.h: 19";
rLen = 100;
rLoc = 305;
rType = 0;
vrLen = 412;
vrLoc = 0;
};
43053A4611A55F2B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */;
name = "CKRequestManager.m: 25";
rLen = 0;
rLoc = 508;
rType = 0;
vrLen = 899;
vrLoc = 0;
};
43053A4911A55F2B003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */;
name = "CKCloudKitManager.m: 72";
rLen = 0;
rLoc = 1878;
rType = 0;
vrLen = 1456;
vrLoc = 0;
};
- 43053A6D11A560A0003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */;
- name = "CloudKit.h: 17";
- rLen = 0;
- rLoc = 342;
- rType = 0;
- vrLen = 367;
- vrLoc = 0;
- };
- 43053A7F11A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 33";
- rLen = 0;
- rLoc = 1584;
- rType = 0;
- vrLen = 2073;
- vrLoc = 0;
- };
43053A8011A567AA003C39C8 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */;
name = "CKCloudKitManager.h: 26";
rLen = 0;
rLoc = 765;
rType = 0;
vrLen = 788;
vrLoc = 0;
};
- 43053A8111A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
- name = "CKEngine.h: 16";
- rLen = 0;
- rLoc = 373;
- rType = 0;
- vrLen = 386;
- vrLoc = 0;
- };
- 43053A8211A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
- name = "CKRoutesEngine.h: 19";
- rLen = 0;
- rLoc = 533;
- rType = 0;
- vrLen = 874;
- vrLoc = 0;
- };
- 43053A8311A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
- name = "CKRoutesEngine.m: 44";
- rLen = 0;
- rLoc = 1198;
- rType = 0;
- vrLen = 1144;
- vrLoc = 385;
- };
- 43053A8411A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
- name = "CKJSONEngine.h: 17";
- rLen = 0;
- rLoc = 459;
- rType = 0;
- vrLen = 839;
- vrLoc = 0;
- };
- 43053A8611A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
- name = "CKHTTPBasicAuthenticationEngine.h: 18";
- rLen = 0;
- rLoc = 528;
- rType = 0;
- vrLen = 624;
- vrLoc = 0;
- };
- 43053A8711A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
- name = "CKHTTPBasicAuthenticationEngine.m: 37";
- rLen = 0;
- rLoc = 952;
- rType = 0;
- vrLen = 906;
- vrLoc = 345;
- };
- 43053A8811A567AA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
- name = "CKRequestOperation.h: 21";
- rLen = 386;
- rLoc = 390;
- rType = 0;
- vrLen = 783;
- vrLoc = 0;
- };
- 43053AA111A5694D003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
- name = "CKRequestOperation.m: 49";
- rLen = 0;
- rLoc = 1383;
- rType = 0;
- vrLen = 1194;
- vrLoc = 712;
- };
- 43053AA211A5694D003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 19";
- rLen = 0;
- rLoc = 661;
- rType = 0;
- vrLen = 968;
- vrLoc = 0;
- };
- 43053AB511A56AAA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 22";
- rLen = 0;
- rLoc = 762;
- rType = 0;
- vrLen = 1126;
- vrLoc = 185;
- };
- 43053AB611A56AAA003C39C8 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 23";
- rLen = 0;
- rLoc = 843;
- rType = 0;
- vrLen = 0;
- vrLoc = 0;
- };
4317EFEC1181DB510045FF78 /* CloudKit.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
- sepNavSelRange = "{342, 0}";
- sepNavVisRange = "{0, 367}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
+ sepNavSelRange = "{430, 0}";
+ sepNavVisRange = "{0, 431}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
sepNavSelRange = "{765, 0}";
sepNavVisRange = "{0, 788}";
};
};
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
- sepNavSelRange = "{528, 0}";
- sepNavVisRange = "{0, 624}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
+ sepNavSelRange = "{557, 0}";
+ sepNavVisRange = "{0, 648}";
};
};
4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
- sepNavSelRange = "{459, 0}";
- sepNavVisRange = "{0, 839}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
+ sepNavSelRange = "{489, 0}";
+ sepNavVisRange = "{0, 496}";
sepNavWindowFrame = "{{38, 294}, {750, 558}}";
};
};
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1063, 456}}";
sepNavSelRange = "{344, 0}";
sepNavVisRange = "{0, 727}";
};
};
4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 667}}";
sepNavSelRange = "{305, 100}";
sepNavVisRange = "{0, 412}";
};
};
4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
- sepNavSelRange = "{390, 386}";
- sepNavVisRange = "{0, 783}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 442}}";
+ sepNavSelRange = "{231, 0}";
+ sepNavVisRange = "{0, 814}";
};
};
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
- sepNavSelRange = "{533, 0}";
- sepNavVisRange = "{0, 874}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
+ sepNavSelRange = "{566, 0}";
+ sepNavVisRange = "{0, 572}";
};
};
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1303, 590}}";
sepNavSelRange = "{201, 11}";
sepNavVisRange = "{0, 265}";
};
};
+ 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 494}}";
+ sepNavSelRange = "{307, 0}";
+ sepNavVisRange = "{0, 780}";
+ };
+ };
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 936}}";
sepNavSelRange = "{1878, 0}";
sepNavVisRange = "{0, 1456}";
};
};
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 689}}";
- sepNavSelRange = "{928, 83}";
- sepNavVisRange = "{344, 907}";
+ sepNavSelRange = "{1146, 0}";
+ sepNavVisRange = "{345, 925}";
};
};
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 689}}";
- sepNavSelRange = "{205, 0}";
- sepNavVisRange = "{160, 1127}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 832}}";
+ sepNavSelRange = "{1147, 0}";
+ sepNavVisRange = "{887, 1111}";
};
};
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1063, 481}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 481}}";
sepNavSelRange = "{562, 0}";
- sepNavVisRange = "{3, 564}";
+ sepNavVisRange = "{23, 544}";
sepNavWindowFrame = "{{15, 315}, {750, 558}}";
};
};
4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 667}}";
sepNavSelRange = "{508, 0}";
sepNavVisRange = "{0, 899}";
};
};
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 936}}";
- sepNavSelRange = "{1383, 0}";
- sepNavVisRange = "{712, 1194}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 1196}}";
+ sepNavSelRange = "{2287, 0}";
+ sepNavVisRange = "{1881, 728}";
};
};
4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1379, 1807}}";
- sepNavSelRange = "{2577, 0}";
- sepNavVisRange = "{806, 468}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 1703}}";
+ sepNavSelRange = "{1596, 0}";
+ sepNavVisRange = "{753, 1083}";
};
};
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1303, 637}}";
sepNavSelRange = "{209, 10}";
sepNavVisRange = "{0, 1393}";
};
};
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1303, 1209}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 1057}";
};
};
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{296, 0}";
sepNavVisRange = "{0, 334}";
};
};
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1108, 672}}";
sepNavSelRange = "{633, 0}";
sepNavVisRange = "{0, 706}";
};
};
431C7F6011A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */;
name = "NSData+CloudKitAdditions.h: 12";
rLen = 11;
rLoc = 201;
rType = 0;
vrLen = 265;
vrLoc = 0;
};
431C7F6111A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */;
name = "NSString+InflectionSupport.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 1057;
vrLoc = 0;
};
431C7F6211A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */;
name = "NSData+CloudKitAdditions.m: 11";
rLen = 10;
rLoc = 209;
rType = 0;
vrLen = 1393;
vrLoc = 0;
};
431C7F6311A4200A004F2B13 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */;
name = "NSKeyValueCoding.h: 127";
rLen = 30;
rLoc = 20057;
rType = 0;
vrLen = 2509;
vrLoc = 18489;
};
431C7F6411A4200A004F2B13 /* NSKeyValueCoding.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = NSKeyValueCoding.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSKeyValueCoding.h;
sourceTree = "<absolute>";
};
433483CC1192BF28008295CA /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */;
name = "CKOAuthEngine.h: 19";
rLen = 0;
rLoc = 344;
rType = 0;
vrLen = 727;
vrLoc = 0;
};
- 4334840E1192C0C9008295CA /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
- name = "CKOAuthEngine.m: 36";
- rLen = 0;
- rLoc = 562;
- rType = 0;
- vrLen = 564;
- vrLoc = 3;
- };
435A08CD1191C14A00030F4C /* CKEngine.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1108, 450}}";
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
sepNavSelRange = "{373, 0}";
sepNavVisRange = "{0, 386}";
};
};
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1251, 629}}";
sepNavSelRange = "{187, 0}";
sepNavVisRange = "{0, 188}";
};
};
- 438E395A11A56B620028F47F /* PBXTextBookmark */ = {
+ 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
+ sepNavSelRange = "{558, 0}";
+ sepNavVisRange = "{0, 619}";
+ };
+ };
+ 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1379, 1768}}";
+ sepNavSelRange = "{1580, 0}";
+ sepNavVisRange = "{1479, 551}";
+ };
+ };
+ 438E3A1511A58C1F0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
- name = "CKHTTPBasicAuthenticationEngine.m: 37";
- rLen = 83;
- rLoc = 928;
+ fRef = 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */;
+ name = "Base64Transcoder.c: 148";
+ rLen = 0;
+ rLoc = 6726;
rType = 0;
- vrLen = 907;
- vrLoc = 344;
+ vrLen = 1330;
+ vrLoc = 6128;
+ };
+ 438E3A1611A58C1F0028F47F /* Base64Transcoder.c */ = {
+ isa = PBXFileReference;
+ name = Base64Transcoder.c;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/oauth-objc/platform/iPhone/../../src/Crypto/Base64Transcoder.c";
+ sourceTree = "<absolute>";
};
- 438E395B11A56B620028F47F /* PBXTextBookmark */ = {
+ 438E3A1711A58C1F0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 17";
+ fRef = 438E3A1811A58C1F0028F47F /* FBDialog.m */;
+ name = "FBDialog.m: 322";
rLen = 0;
- rLoc = 556;
+ rLoc = 11414;
rType = 0;
- vrLen = 1082;
- vrLoc = 160;
+ vrLen = 1860;
+ vrLoc = 10804;
+ };
+ 438E3A1811A58C1F0028F47F /* FBDialog.m */ = {
+ isa = PBXFileReference;
+ name = FBDialog.m;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/platform/iPhone/../../src/FBDialog.m";
+ sourceTree = "<absolute>";
};
- 438E395C11A56B620028F47F /* PBXTextBookmark */ = {
+ 438E3A3911A58ECC0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 17";
+ fRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */;
+ name = "NSString+InflectionSupport.h: 16";
+ rLen = 0;
+ rLoc = 307;
+ rType = 0;
+ vrLen = 780;
+ vrLoc = 0;
+ };
+ 438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1108, 424}}";
+ sepNavSelRange = "{366, 0}";
+ sepNavVisRange = "{0, 366}";
+ };
+ };
+ 438E3A9211A599EE0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */;
+ name = "CKOAuthEngine.m: 36";
rLen = 0;
- rLoc = 340;
+ rLoc = 562;
rType = 0;
- vrLen = 1156;
- vrLoc = 160;
+ vrLen = 544;
+ vrLoc = 23;
};
- 438E396011A56BC40028F47F /* PBXTextBookmark */ = {
+ 438E3A9311A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 17";
+ fRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */;
+ name = "CKDictionarizerEngine.h: 19";
rLen = 0;
- rLoc = 340;
+ rLoc = 558;
rType = 0;
- vrLen = 1155;
- vrLoc = 160;
+ vrLen = 619;
+ vrLoc = 0;
};
- 438E396D11A56CD60028F47F /* PBXTextBookmark */ = {
+ 438E3A9411A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 22";
+ fRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */;
+ name = "CKHTTPBasicAuthenticationEngine.m: 40";
rLen = 0;
- rLoc = 690;
+ rLoc = 1146;
rType = 0;
- vrLen = 1155;
- vrLoc = 160;
+ vrLen = 925;
+ vrLoc = 345;
};
- 438E396E11A56CD60028F47F /* PBXTextBookmark */ = {
+ 438E3A9511A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 33";
+ fRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */;
+ name = "CKHTTPBasicAuthenticationEngine.h: 18";
rLen = 0;
- rLoc = 1584;
+ rLoc = 557;
rType = 0;
- vrLen = 2073;
+ vrLen = 648;
vrLoc = 0;
};
- 438E396F11A56CD60028F47F /* PBXTextBookmark */ = {
+ 438E3A9611A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 12";
+ fRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */;
+ name = "CKRoutesEngine.h: 20";
rLen = 0;
- rLoc = 234;
+ rLoc = 566;
rType = 0;
- vrLen = 2073;
+ vrLen = 572;
vrLoc = 0;
};
- 438E397511A56CDF0028F47F /* PBXTextBookmark */ = {
+ 438E3A9711A599EE0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */;
+ name = "CKRoutesEngine.m: 55";
+ rLen = 0;
+ rLoc = 1596;
+ rType = 0;
+ vrLen = 1083;
+ vrLoc = 753;
+ };
+ 438E3A9811A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 12";
+ fRef = 435A08CD1191C14A00030F4C /* CKEngine.h */;
+ name = "CKEngine.h: 16";
rLen = 0;
- rLoc = 234;
+ rLoc = 373;
rType = 0;
- vrLen = 2073;
+ vrLen = 386;
vrLoc = 0;
};
- 438E397D11A56D2B0028F47F /* PBXTextBookmark */ = {
+ 438E3A9911A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 12";
+ fRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */;
+ name = "CloudKit.h: 21";
rLen = 0;
- rLoc = 234;
+ rLoc = 430;
rType = 0;
- vrLen = 439;
+ vrLen = 431;
vrLoc = 0;
};
- 438E397E11A56DC60028F47F /* PBXTextBookmark */ = {
+ 438E3A9A11A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 43053A1111A55398003C39C8 /* HTTPStatus.strings */;
- name = "HTTPStatus.strings: 12";
+ fRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */;
+ name = "CKRequestOperation.h: 13";
rLen = 0;
- rLoc = 234;
+ rLoc = 231;
rType = 0;
- vrLen = 2073;
+ vrLen = 814;
vrLoc = 0;
};
- 438E397F11A56DC60028F47F /* PBXTextBookmark */ = {
+ 438E3A9B11A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 22";
+ fRef = 438E3A9C11A599EE0028F47F /* FBRequest.h */;
+ name = "FBRequest.h: 134";
+ rLen = 70;
+ rLoc = 3444;
+ rType = 0;
+ vrLen = 852;
+ vrLoc = 3045;
+ };
+ 438E3A9C11A599EE0028F47F /* FBRequest.h */ = {
+ isa = PBXFileReference;
+ name = FBRequest.h;
+ path = "/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/lib/fbconnect-objc/src/FBConnect/FBRequest.h";
+ sourceTree = "<absolute>";
+ };
+ 438E3A9D11A599EE0028F47F /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */;
+ name = "CKRequestOperation.m: 74";
rLen = 0;
- rLoc = 690;
+ rLoc = 2287;
rType = 0;
- vrLen = 1155;
- vrLoc = 160;
+ vrLen = 728;
+ vrLoc = 1881;
};
- 438E398011A56DC60028F47F /* PBXTextBookmark */ = {
+ 438E3A9E11A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 21";
+ fRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */;
+ name = "CKJSONEngine.h: 17";
rLen = 0;
- rLoc = 556;
+ rLoc = 489;
rType = 0;
- vrLen = 1126;
- vrLoc = 160;
+ vrLen = 496;
+ vrLoc = 0;
};
- 438E398111A56DD60028F47F /* PBXTextBookmark */ = {
+ 438E3A9F11A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 21";
+ name = "CKJSONEngine.m: 37";
rLen = 0;
- rLoc = 556;
+ rLoc = 1147;
rType = 0;
- vrLen = 1126;
- vrLoc = 160;
+ vrLen = 1111;
+ vrLoc = 887;
};
- 438E398411A56DF70028F47F /* PBXTextBookmark */ = {
+ 438E3AA011A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 11";
+ fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
+ name = "CKDictionarizerEngine.m: 53";
rLen = 0;
- rLoc = 205;
+ rLoc = 1400;
rType = 0;
- vrLen = 1127;
- vrLoc = 160;
+ vrLen = 952;
+ vrLoc = 629;
};
- 438E398711A56E010028F47F /* PBXTextBookmark */ = {
+ 438E3AA111A599EE0028F47F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */;
- name = "CKJSONEngine.m: 11";
+ fRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */;
+ name = "CKDictionarizerEngine.m: 49";
rLen = 0;
- rLoc = 205;
+ rLoc = 1246;
rType = 0;
- vrLen = 1127;
- vrLoc = 160;
+ vrLen = 997;
+ vrLoc = 835;
};
43A20C9F116DBEAB00BA930A /* Source Control */ = {
isa = PBXSourceControlManager;
fallbackIsa = XCSourceControlManager;
isSCMEnabled = 0;
scmConfiguration = {
repositoryNamesForRoots = {
"" = "";
};
};
};
43A20CA0116DBEAB00BA930A /* Code sense */ = {
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
43A20EB5116DD04D00BA930A /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 43A20EB6116DD04D00BA930A /* NSString.h */;
name = "NSString.h: 187";
rLen = 120;
rLoc = 9394;
rType = 0;
vrLen = 3358;
vrLoc = 7953;
};
43A20EB6116DD04D00BA930A /* NSString.h */ = {
isa = PBXFileReference;
lastKnownFileType = sourcecode.c.h;
name = NSString.h;
path = /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSString.h;
sourceTree = "<absolute>";
};
D2AAC07D0554694100DB518D /* CloudKit */ = {
activeExec = 0;
};
}
diff --git a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3 b/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
index 624897f..262604b 100644
--- a/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
+++ b/platform/iPhone/CloudKit.xcodeproj/Ludovic.perspectivev3
@@ -1,978 +1,982 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ActivePerspectiveName</key>
<string>Project</string>
<key>AllowedModules</key>
<array>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Name</key>
<string>Groups and Files Outline View</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Name</key>
<string>Editor</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCTaskListModule</string>
<key>Name</key>
<string>Task List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDetailModule</string>
<key>Name</key>
<string>File and Smart Group Detail Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Name</key>
<string>Detailed Build Results Viewer</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Name</key>
<string>Project Batch Find Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCProjectFormatConflictsModule</string>
<key>Name</key>
<string>Project Format Conflicts List</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXBookmarksModule</string>
<key>Name</key>
<string>Bookmarks Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXClassBrowserModule</string>
<key>Name</key>
<string>Class Browser</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXCVSModule</string>
<key>Name</key>
<string>Source Code Control Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXDebugBreakpointsModule</string>
<key>Name</key>
<string>Debug Breakpoints Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCDockableInspector</string>
<key>Name</key>
<string>Inspector</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>PBXOpenQuicklyModule</string>
<key>Name</key>
<string>Open Quickly Tool</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Name</key>
<string>Debugger</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>1</string>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Name</key>
<string>Debug Console</string>
</dict>
<dict>
<key>BundleLoadPath</key>
<string></string>
<key>MaxInstances</key>
<string>n</string>
<key>Module</key>
<string>XCSnapshotModule</string>
<key>Name</key>
<string>Snapshots Tool</string>
</dict>
</array>
<key>BundlePath</key>
<string>/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources</string>
<key>Description</key>
<string>AIODescriptionKey</string>
<key>DockingSystemVisible</key>
<false/>
<key>Extension</key>
<string>perspectivev3</string>
<key>FavBarConfig</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433105020F1280740091B39C</string>
<key>XCBarModuleItemNames</key>
<dict/>
<key>XCBarModuleItems</key>
<array/>
</dict>
<key>FirstTimeWindowDisplayed</key>
<false/>
<key>Identifier</key>
<string>com.apple.perspectives.project.defaultV3</string>
<key>MajorVersion</key>
<integer>34</integer>
<key>MinorVersion</key>
<integer>0</integer>
<key>Name</key>
<string>All-In-One</string>
<key>Notifications</key>
<array/>
<key>OpenEditors</key>
<array/>
<key>PerspectiveWidths</key>
<array>
<integer>1440</integer>
<integer>1440</integer>
</array>
<key>Perspectives</key>
<array>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>active-combo-popup</string>
<string>action</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>debugger-enable-breakpoints</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>get-info</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>com.apple.pbx.toolbar.searchfield</string>
</array>
<key>ControllerClassBaseName</key>
<string></string>
<key>IconName</key>
<string>WindowOfProject</string>
<key>Identifier</key>
<string>perspective.project</string>
<key>IsVertical</key>
<false/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
<array>
<string>1C37FBAC04509CD000000102</string>
<string>1C37FAAC04509CD000000102</string>
<string>1C37FABC05509CD000000102</string>
<string>1C37FABC05539CD112110102</string>
<string>E2644B35053B69B200211256</string>
<string>1C37FABC04509CD000100104</string>
<string>1CC0EA4004350EF90044410B</string>
<string>1CC0EA4004350EF90041110B</string>
<string>1C77FABC04509CD000000102</string>
</array>
<key>PBXProjectModuleGUID</key>
<string>1CA23ED40692098700951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Files</string>
<key>PBXProjectStructureProvided</key>
<string>yes</string>
<key>PBXSmartGroupTreeModuleColumnData</key>
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
<real>22</real>
<real>227</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
<string>SCMStatusColumn</string>
<string>MainColumn</string>
</array>
</dict>
<key>PBXSmartGroupTreeModuleOutlineStateKey_v7</key>
<dict>
<key>PBXSmartGroupTreeModuleOutlineStateExpansionKey</key>
<array>
<string>0867D691FE84028FC02AAC07</string>
<string>08FB77AEFE84172EC02AAC07</string>
<string>43053A2811A55962003C39C8</string>
<string>43A20CF0116DC0DA00BA930A</string>
- <string>43A20CF1116DC0DA00BA930A</string>
<string>43A20CE0116DC0DA00BA930A</string>
- <string>43A20FD4116DD8F900BA930A</string>
+ <string>438E39B611A5831B0028F47F</string>
<string>43A20DA1116DC5A400BA930A</string>
- <string>43A20CE2116DC0DA00BA930A</string>
<string>435A08CC1191C13000030F4C</string>
+ <string>32C88DFF0371C24200C91783</string>
<string>1C37FBAC04509CD000000102</string>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>26</integer>
- <integer>24</integer>
- <integer>20</integer>
+ <integer>15</integer>
+ <integer>13</integer>
+ <integer>12</integer>
<integer>2</integer>
<integer>0</integer>
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 0}, {249, 691}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
<key>XCIncludePerspectivesSwitch</key>
<false/>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {266, 709}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>SCMStatusColumn</string>
<real>22</real>
<string>MainColumn</string>
<real>227</real>
</array>
<key>RubberWindowFrame</key>
<string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
<string>266pt</string>
</dict>
<dict>
<key>Dock</key>
<array>
<dict>
<key>BecomeActive</key>
<true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F70F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CKJSONEngine.m</string>
+ <string>CKDictionarizerEngine.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>433104F80F1280740091B39C</string>
<key>PBXProjectModuleLabel</key>
- <string>CKJSONEngine.m</string>
+ <string>CKDictionarizerEngine.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>438E398711A56E010028F47F</string>
+ <string>438E3AA111A599EE0028F47F</string>
<key>history</key>
<array>
<string>43A20EB5116DD04D00BA930A</string>
<string>433483CC1192BF28008295CA</string>
- <string>4334840E1192C0C9008295CA</string>
<string>431C7F6011A4200A004F2B13</string>
<string>431C7F6111A4200A004F2B13</string>
<string>431C7F6211A4200A004F2B13</string>
<string>431C7F6311A4200A004F2B13</string>
<string>430538CB11A531EF003C39C8</string>
<string>430538CC11A531EF003C39C8</string>
<string>4305392211A5366B003C39C8</string>
<string>4305392311A5366B003C39C8</string>
<string>43053A4511A55F2B003C39C8</string>
<string>43053A4611A55F2B003C39C8</string>
<string>43053A4911A55F2B003C39C8</string>
- <string>43053A6D11A560A0003C39C8</string>
<string>43053A8011A567AA003C39C8</string>
- <string>43053A8111A567AA003C39C8</string>
- <string>43053A8211A567AA003C39C8</string>
- <string>43053A8311A567AA003C39C8</string>
- <string>43053A8411A567AA003C39C8</string>
- <string>43053A8611A567AA003C39C8</string>
- <string>43053A8811A567AA003C39C8</string>
- <string>43053AA111A5694D003C39C8</string>
- <string>438E395A11A56B620028F47F</string>
- <string>438E397E11A56DC60028F47F</string>
- <string>438E397F11A56DC60028F47F</string>
+ <string>438E3A1511A58C1F0028F47F</string>
+ <string>438E3A1711A58C1F0028F47F</string>
+ <string>438E3A3911A58ECC0028F47F</string>
+ <string>438E3A9211A599EE0028F47F</string>
+ <string>438E3A9311A599EE0028F47F</string>
+ <string>438E3A9411A599EE0028F47F</string>
+ <string>438E3A9511A599EE0028F47F</string>
+ <string>438E3A9611A599EE0028F47F</string>
+ <string>438E3A9711A599EE0028F47F</string>
+ <string>438E3A9811A599EE0028F47F</string>
+ <string>438E3A9911A599EE0028F47F</string>
+ <string>438E3A9A11A599EE0028F47F</string>
+ <string>438E3A9B11A599EE0028F47F</string>
+ <string>438E3A9D11A599EE0028F47F</string>
+ <string>438E3A9E11A599EE0028F47F</string>
+ <string>438E3A9F11A599EE0028F47F</string>
+ <string>438E3AA011A599EE0028F47F</string>
</array>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<true/>
<key>XCSharingToken</key>
<string>com.apple.Xcode.CommonNavigatorGroupSharingToken</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1169, 481}}</string>
<key>RubberWindowFrame</key>
<string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>481pt</string>
</dict>
<dict>
<key>Proportion</key>
<string>223pt</string>
<key>Tabs</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EDF0692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Detail</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1169, 196}}</string>
- <key>RubberWindowFrame</key>
- <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE00692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1169, 190}}</string>
+ <string>{{10, 27}, {1169, 196}}</string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXCVSModuleFilterTypeKey</key>
<integer>1032</integer>
<key>PBXProjectModuleGUID</key>
<string>1CA23EE10692099D00951B8B</string>
<key>PBXProjectModuleLabel</key>
<string>SCM Results</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {1124, 223}}</string>
</dict>
<key>Module</key>
<string>PBXCVSModule</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build Results</string>
<key>XCBuildResultsTrigger_Collapse</key>
<integer>1021</integer>
<key>XCBuildResultsTrigger_Open</key>
<integer>1011</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {1364, 239}}</string>
+ <string>{{10, 27}, {1169, 196}}</string>
+ <key>RubberWindowFrame</key>
+ <string>0 128 1440 750 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
</dict>
</array>
</dict>
</array>
<key>Proportion</key>
<string>1169pt</string>
</dict>
</array>
<key>Name</key>
<string>Project</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXSmartGroupTreeModule</string>
<string>XCModuleDock</string>
<string>PBXNavigatorGroup</string>
<string>XCDockableTabModule</string>
<string>XCDetailModule</string>
<string>PBXProjectFindModule</string>
<string>PBXCVSModule</string>
<string>PBXBuildResultsModule</string>
</array>
<key>TableOfContents</key>
<array>
<string>438E395D11A56B620028F47F</string>
<string>1CA23ED40692098700951B8B</string>
<string>438E395E11A56B620028F47F</string>
<string>433104F70F1280740091B39C</string>
<string>438E395F11A56B620028F47F</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.defaultV3</string>
</dict>
<dict>
<key>ChosenToolbarItems</key>
<array>
<string>XCToolbarPerspectiveControl</string>
<string>NSToolbarSeparatorItem</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>build-and-go</string>
<string>com.apple.ide.PBXToolbarStopButton</string>
<string>debugger-restart-executable</string>
<string>debugger-pause</string>
<string>debugger-step-over</string>
<string>debugger-step-into</string>
<string>debugger-step-out</string>
<string>debugger-enable-breakpoints</string>
<string>NSToolbarFlexibleSpaceItem</string>
<string>clear-log</string>
</array>
<key>ControllerClassBaseName</key>
<string>PBXDebugSessionModule</string>
<key>IconName</key>
<string>DebugTabIcon</string>
<key>Identifier</key>
<string>perspective.debug</string>
<key>IsVertical</key>
<true/>
<key>Layout</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CCC7628064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debugger Console</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {1440, 197}}</string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
<string>197pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {720, 252}}</string>
<string>{{720, 0}, {720, 252}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {1440, 252}}</string>
<string>{{0, 252}, {1440, 255}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1CCC7629064C1048000F2A68</string>
<key>PBXProjectModuleLabel</key>
<string>Debug</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 202}, {1440, 507}}</string>
<key>PBXDebugSessionStackFrameViewKey</key>
<dict>
<key>DebugVariablesTableConfiguration</key>
<array>
<string>Name</string>
<real>120</real>
<string>Value</string>
<real>85</real>
<string>Summary</string>
<real>490</real>
</array>
<key>Frame</key>
<string>{{720, 0}, {720, 252}}</string>
</dict>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>507pt</string>
</dict>
</array>
<key>Name</key>
<string>Debug</string>
<key>ServiceClasses</key>
<array>
<string>XCModuleDock</string>
<string>PBXDebugCLIModule</string>
<string>PBXDebugSessionModule</string>
<string>PBXDebugProcessAndThreadModule</string>
<string>PBXDebugProcessViewModule</string>
<string>PBXDebugThreadViewModule</string>
<string>PBXDebugStackFrameViewModule</string>
<string>PBXNavigatorGroup</string>
</array>
<key>TableOfContents</key>
<array>
<string>438E397611A56CDF0028F47F</string>
<string>1CCC7628064C1048000F2A68</string>
<string>1CCC7629064C1048000F2A68</string>
<string>438E397711A56CDF0028F47F</string>
<string>438E397811A56CDF0028F47F</string>
<string>438E397911A56CDF0028F47F</string>
<string>438E397A11A56CDF0028F47F</string>
<string>433104F70F1280740091B39C</string>
</array>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
</dict>
</array>
<key>PerspectivesBarVisible</key>
<true/>
<key>ShelfIsVisible</key>
<false/>
<key>SourceDescription</key>
<string>file at '/Developer/Library/PrivateFrameworks/DevToolsInterface.framework/Resources/XCPerspectivesSpecification.xcperspec'</string>
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
<real>0.0</real>
<key>ToolbarDisplayMode</key>
<integer>1</integer>
<key>ToolbarIsVisible</key>
<true/>
<key>ToolbarSizeMode</key>
<integer>1</integer>
<key>Type</key>
<string>Perspectives</string>
<key>UpdateMessage</key>
<string></string>
<key>WindowJustification</key>
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>/Volumes/Scrumers mobile/Scrumers/Libraries/CloudKit/platform/iPhone/CloudKit.xcodeproj</string>
</array>
<key>WindowString</key>
<string>0 128 1440 750 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>
<key>Identifier</key>
<string>windowTool.debugger</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>Debugger</key>
<dict>
<key>HorizontalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {317, 164}}</string>
<string>{{317, 0}, {377, 164}}</string>
</array>
</dict>
<key>VerticalSplitView</key>
<dict>
<key>_collapsingFrameDimension</key>
<real>0.0</real>
<key>_indexOfCollapsedView</key>
<integer>0</integer>
<key>_percentageOfCollapsedView</key>
<real>0.0</real>
<key>isCollapsed</key>
<string>yes</string>
<key>sizes</key>
<array>
<string>{{0, 0}, {694, 164}}</string>
<string>{{0, 164}, {694, 216}}</string>
</array>
</dict>
</dict>
<key>LauncherConfigVersion</key>
<string>8</string>
<key>PBXProjectModuleGUID</key>
<string>1C162984064C10D400B95A72</string>
<key>PBXProjectModuleLabel</key>
<string>Debug - GLUTExamples (Underwater)</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>DebugConsoleDrawerSize</key>
<string>{100, 120}</string>
<key>DebugConsoleVisible</key>
<string>None</string>
<key>DebugConsoleWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>DebugSTDIOWindowFrame</key>
<string>{{200, 200}, {500, 300}}</string>
<key>Frame</key>
<string>{{0, 0}, {694, 380}}</string>
<key>RubberWindowFrame</key>
<string>321 238 694 422 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugSessionModule</string>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Proportion</key>
<string>100%</string>
</dict>
</array>
<key>Name</key>
<string>Debugger</string>
<key>ServiceClasses</key>
<array>
<string>PBXDebugSessionModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
<string>1C0AD2AB069F1E9B00FABCE6</string>
<string>1C162984064C10D400B95A72</string>
<string>1C0AD2AC069F1E9B00FABCE6</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
<key>WindowString</key>
<string>321 238 694 422 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1CD10A99069EF8BA00B06720</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.build</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD052900623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {500, 215}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>218pt</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>XCMainBuildResultsModuleGUID</string>
<key>PBXProjectModuleLabel</key>
<string>Build</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 222}, {500, 236}}</string>
<key>RubberWindowFrame</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
<key>Proportion</key>
<string>236pt</string>
</dict>
</array>
<key>Proportion</key>
<string>458pt</string>
</dict>
</array>
<key>Name</key>
<string>Build Results</string>
<key>ServiceClasses</key>
<array>
<string>PBXBuildResultsModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C78EAA5065D492600B07095</string>
<string>1C78EAA6065D492600B07095</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.buildV3</string>
<key>WindowString</key>
<string>192 257 500 500 0 0 1280 1002 </string>
</dict>
<dict>
<key>Identifier</key>
<string>windowTool.find</string>
<key>Layout</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>Dock</key>
<array>
<dict>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key>
<string><No Editor></string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528D0623707200166675</string>
</dict>
<key>SplitCount</key>
<string>1</string>
</dict>
<key>StatusBarVisibility</key>
<integer>1</integer>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {781, 167}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>781pt</string>
</dict>
</array>
<key>Proportion</key>
<string>50%</string>
</dict>
<dict>
<key>BecomeActive</key>
<integer>1</integer>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
<string>1CD0528E0623707200166675</string>
<key>PBXProjectModuleLabel</key>
<string>Project Find</string>
</dict>
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{8, 0}, {773, 254}}</string>
<key>RubberWindowFrame</key>
<string>62 385 781 470 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXProjectFindModule</string>
<key>Proportion</key>
<string>50%</string>
</dict>
</array>
<key>Proportion</key>
<string>428pt</string>
</dict>
</array>
<key>Name</key>
<string>Project Find</string>
<key>ServiceClasses</key>
<array>
<string>PBXProjectFindModule</string>
</array>
<key>StatusbarIsVisible</key>
<integer>1</integer>
<key>TableOfContents</key>
<array>
<string>1C530D57069F1CE1000CFCEE</string>
<string>1C530D58069F1CE1000CFCEE</string>
<string>1C530D59069F1CE1000CFCEE</string>
<string>1CDD528C0622207200134675</string>
<string>1C530D5A069F1CE1000CFCEE</string>
<string>1CE0B1FE06471DED0097A5F4</string>
<string>1CD0528E0623707200166675</string>
</array>
<key>WindowString</key>
<string>62 385 781 470 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key>
<integer>0</integer>
</dict>
<dict>
diff --git a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj b/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
index e54b902..1e86f09 100644
--- a/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
+++ b/platform/iPhone/CloudKit.xcodeproj/project.pbxproj
@@ -1,592 +1,612 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */; };
4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */; };
4317EFED1181DB510045FF78 /* CloudKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEC1181DB510045FF78 /* CloudKit.h */; };
4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */; };
4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */; };
4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF21181DB850045FF78 /* CKJSONEngine.h */; };
4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF31181DB850045FF78 /* CKOAuthEngine.h */; };
4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF41181DB850045FF78 /* CKRequestManager.h */; };
4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF51181DB850045FF78 /* CKRequestOperation.h */; };
4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF61181DB850045FF78 /* CKRoutesEngine.h */; };
4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */; };
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */; };
4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */; };
4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */; };
4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFC1181DB850045FF78 /* CKJSONEngine.m */; };
4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */; };
4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFE1181DB850045FF78 /* CKRequestManager.m */; };
4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317EFFF1181DB850045FF78 /* CKRequestOperation.m */; };
4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0001181DB850045FF78 /* CKRoutesEngine.m */; };
4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */; };
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */; };
4317F1391181E2480045FF78 /* libOAuthConsumer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */; settings = {ATTRIBUTES = (Required, ); }; };
4317F13A1181E2510045FF78 /* libFBPlatform.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4317F0E91181E0B80045FF78 /* libFBPlatform.a */; settings = {ATTRIBUTES = (Required, ); }; };
431C7DB411A40519004F2B13 /* libTouchJSON.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 431C7D7611A402FA004F2B13 /* libTouchJSON.a */; };
431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */; };
431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */; };
435A08CE1191C14A00030F4C /* CKEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 435A08CD1191C14A00030F4C /* CKEngine.h */; };
4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */; };
+ 438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */; };
+ 438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */; };
+ 438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 438E3A6A11A595740028F47F /* CKRequestDelegate.h */; };
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = BE61A71B0DE2551300D4F7B9;
remoteInfo = FBPlatform;
};
4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = OAuthConsumer;
};
4317F1291181E22F0045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = BE61A71A0DE2551300D4F7B9;
remoteInfo = FBPlatform;
};
4317F12B1181E2320045FF78 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = OAuthConsumer;
};
431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC07E0554694100DB518D;
remoteInfo = TouchJSON;
};
431C7DB511A40525004F2B13 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC07D0554694100DB518D;
remoteInfo = TouchJSON;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+CloudKitAdditions.h"; sourceTree = "<group>"; };
- 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+CloudKitAdditions.m"; sourceTree = "<group>"; };
- 43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = HTTPStatus.strings; sourceTree = "<group>"; };
+ 4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSMutableArray+CloudKitAdditions.h"; path = "../../src/NSMutableArray+CloudKitAdditions.h"; sourceTree = "<group>"; };
+ 4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSMutableArray+CloudKitAdditions.m"; path = "../../src/NSMutableArray+CloudKitAdditions.m"; sourceTree = "<group>"; };
+ 43053A1111A55398003C39C8 /* HTTPStatus.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = HTTPStatus.strings; path = ../../src/HTTPStatus.strings; sourceTree = "<group>"; };
4317EFEC1181DB510045FF78 /* CloudKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CloudKit.h; path = ../../src/CloudKit/CloudKit.h; sourceTree = SOURCE_ROOT; };
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKCloudKitManager.h; path = ../../src/CKCloudKitManager.h; sourceTree = SOURCE_ROOT; };
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKHTTPBasicAuthenticationEngine.h; path = ../../src/CKHTTPBasicAuthenticationEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF21181DB850045FF78 /* CKJSONEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKJSONEngine.h; path = ../../src/CKJSONEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKOAuthEngine.h; path = ../../src/CKOAuthEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF41181DB850045FF78 /* CKRequestManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestManager.h; path = ../../src/CKRequestManager.h; sourceTree = SOURCE_ROOT; };
4317EFF51181DB850045FF78 /* CKRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestOperation.h; path = ../../src/CKRequestOperation.h; sourceTree = SOURCE_ROOT; };
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRoutesEngine.h; path = ../../src/CKRoutesEngine.h; sourceTree = SOURCE_ROOT; };
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSData+CloudKitAdditions.h"; path = "../../src/NSData+CloudKitAdditions.h"; sourceTree = SOURCE_ROOT; };
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSString+InflectionSupport.h"; path = "../../src/NSString+InflectionSupport.h"; sourceTree = SOURCE_ROOT; };
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKCloudKitManager.m; path = ../../src/CKCloudKitManager.m; sourceTree = SOURCE_ROOT; };
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKHTTPBasicAuthenticationEngine.m; path = ../../src/CKHTTPBasicAuthenticationEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKJSONEngine.m; path = ../../src/CKJSONEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKOAuthEngine.m; path = ../../src/CKOAuthEngine.m; sourceTree = SOURCE_ROOT; };
4317EFFE1181DB850045FF78 /* CKRequestManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestManager.m; path = ../../src/CKRequestManager.m; sourceTree = SOURCE_ROOT; };
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRequestOperation.m; path = ../../src/CKRequestOperation.m; sourceTree = SOURCE_ROOT; };
4317F0001181DB850045FF78 /* CKRoutesEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKRoutesEngine.m; path = ../../src/CKRoutesEngine.m; sourceTree = SOURCE_ROOT; };
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+CloudKitAdditions.m"; path = "../../src/NSData+CloudKitAdditions.m"; sourceTree = SOURCE_ROOT; };
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSString+InflectionSupport.m"; path = "../../src/NSString+InflectionSupport.m"; sourceTree = SOURCE_ROOT; };
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TouchJSON.xcodeproj; path = "../../lib/touchjson-objc/src/TouchJSON.xcodeproj"; sourceTree = SOURCE_ROOT; };
- 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CloudKitAdditions.h"; sourceTree = "<group>"; };
- 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CloudKitAdditions.m"; sourceTree = "<group>"; };
+ 431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+CloudKitAdditions.h"; path = "../../src/NSDictionary+CloudKitAdditions.h"; sourceTree = "<group>"; };
+ 431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+CloudKitAdditions.m"; path = "../../src/NSDictionary+CloudKitAdditions.m"; sourceTree = "<group>"; };
435A08CD1191C14A00030F4C /* CKEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKEngine.h; path = ../../src/CKEngine.h; sourceTree = "<group>"; };
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CloudKit_Prefix.pch; sourceTree = "<group>"; };
+ 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKDictionarizerEngine.h; path = ../../src/CKDictionarizerEngine.h; sourceTree = "<group>"; };
+ 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CKDictionarizerEngine.m; path = ../../src/CKDictionarizerEngine.m; sourceTree = "<group>"; };
+ 438E3A6A11A595740028F47F /* CKRequestDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CKRequestDelegate.h; path = ../../src/CKRequestDelegate.h; sourceTree = "<group>"; };
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OAuthConsumer.xcodeproj; path = "../../lib/oauth-objc/platform/iPhone/OAuthConsumer.xcodeproj"; sourceTree = SOURCE_ROOT; };
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FBConnect.xcodeproj; path = "../../lib/fbconnect-objc/platform/iPhone/FBConnect.xcodeproj"; sourceTree = SOURCE_ROOT; };
AACBBE490F95108600F1A2B1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
D2AAC07E0554694100DB518D /* libCloudKit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCloudKit.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
D2AAC07C0554694100DB518D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
AACBBE4A0F95108600F1A2B1 /* Foundation.framework in Frameworks */,
4317F1391181E2480045FF78 /* libOAuthConsumer.a in Frameworks */,
4317F13A1181E2510045FF78 /* libFBPlatform.a in Frameworks */,
431C7DB411A40519004F2B13 /* libTouchJSON.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
D2AAC07E0554694100DB518D /* libCloudKit.a */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* CloudKit */ = {
isa = PBXGroup;
children = (
4317EFEC1181DB510045FF78 /* CloudKit.h */,
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
0867D69AFE84028FC02AAC07 /* Frameworks */,
034768DFFF38A50411DB9C8B /* Products */,
43053A1111A55398003C39C8 /* HTTPStatus.strings */,
);
name = CloudKit;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* Frameworks */ = {
isa = PBXGroup;
children = (
AACBBE490F95108600F1A2B1 /* Foundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
43053A2811A55962003C39C8 /* Core */,
43A20CF0116DC0DA00BA930A /* Utils */,
43A20CE0116DC0DA00BA930A /* Engines */,
435A08CC1191C13000030F4C /* Route engines */,
+ 438E3A6A11A595740028F47F /* CKRequestDelegate.h */,
);
name = Classes;
sourceTree = "<group>";
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
4378EF791181D6AA004697B8 /* CloudKit_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
43053A2811A55962003C39C8 /* Core */ = {
isa = PBXGroup;
children = (
4317EFEF1181DB850045FF78 /* CKCloudKitManager.h */,
4317EFFA1181DB850045FF78 /* CKCloudKitManager.m */,
4317EFF41181DB850045FF78 /* CKRequestManager.h */,
4317EFFE1181DB850045FF78 /* CKRequestManager.m */,
4317EFF51181DB850045FF78 /* CKRequestOperation.h */,
4317EFFF1181DB850045FF78 /* CKRequestOperation.m */,
);
name = Core;
sourceTree = "<group>";
};
4317F0E51181E0B80045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0E91181E0B80045FF78 /* libFBPlatform.a */,
);
name = Products;
sourceTree = "<group>";
};
4317F0ED1181E0C70045FF78 /* Products */ = {
isa = PBXGroup;
children = (
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */,
);
name = Products;
sourceTree = "<group>";
};
431C7D6F11A402FA004F2B13 /* Products */ = {
isa = PBXGroup;
children = (
431C7D7611A402FA004F2B13 /* libTouchJSON.a */,
);
name = Products;
sourceTree = "<group>";
};
435A08CC1191C13000030F4C /* Route engines */ = {
isa = PBXGroup;
children = (
435A08CD1191C14A00030F4C /* CKEngine.h */,
);
name = "Route engines";
sourceTree = "<group>";
};
+ 438E39B611A5831B0028F47F /* Dictionarizer */ = {
+ isa = PBXGroup;
+ children = (
+ 438E39B711A5834F0028F47F /* CKDictionarizerEngine.h */,
+ 438E39B811A5834F0028F47F /* CKDictionarizerEngine.m */,
+ );
+ name = Dictionarizer;
+ sourceTree = "<group>";
+ };
43A20CE0116DC0DA00BA930A /* Engines */ = {
isa = PBXGroup;
children = (
+ 438E39B611A5831B0028F47F /* Dictionarizer */,
43A20FD4116DD8F900BA930A /* Routes */,
43A20DA1116DC5A400BA930A /* JSON */,
43A20DA2116DC5B000BA930A /* XML */,
43A20CE9116DC0DA00BA930A /* FBConnect */,
43A20CE5116DC0DA00BA930A /* OAuth */,
43A20CE2116DC0DA00BA930A /* HTTP Basic */,
);
name = Engines;
sourceTree = "<group>";
};
43A20CE2116DC0DA00BA930A /* HTTP Basic */ = {
isa = PBXGroup;
children = (
4317EFF01181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h */,
4317EFFB1181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m */,
);
name = "HTTP Basic";
sourceTree = "<group>";
};
43A20CE5116DC0DA00BA930A /* OAuth */ = {
isa = PBXGroup;
children = (
4317EFF31181DB850045FF78 /* CKOAuthEngine.h */,
4317EFFD1181DB850045FF78 /* CKOAuthEngine.m */,
43A21086116DEB2B00BA930A /* Library */,
);
name = OAuth;
sourceTree = "<group>";
};
43A20CE9116DC0DA00BA930A /* FBConnect */ = {
isa = PBXGroup;
children = (
43A2107F116DEB2000BA930A /* Library */,
);
name = FBConnect;
sourceTree = "<group>";
};
43A20CF0116DC0DA00BA930A /* Utils */ = {
isa = PBXGroup;
children = (
43A20CF1116DC0DA00BA930A /* Extensions */,
);
name = Utils;
sourceTree = "<group>";
};
43A20CF1116DC0DA00BA930A /* Extensions */ = {
isa = PBXGroup;
children = (
4317EFF81181DB850045FF78 /* NSData+CloudKitAdditions.h */,
4317F0011181DB850045FF78 /* NSData+CloudKitAdditions.m */,
4317EFF91181DB850045FF78 /* NSString+InflectionSupport.h */,
4317F0021181DB850045FF78 /* NSString+InflectionSupport.m */,
431C7F5C11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h */,
431C7F5D11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m */,
4305391A11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h */,
4305391B11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m */,
);
name = Extensions;
sourceTree = "<group>";
};
43A20DA1116DC5A400BA930A /* JSON */ = {
isa = PBXGroup;
children = (
4317EFF21181DB850045FF78 /* CKJSONEngine.h */,
4317EFFC1181DB850045FF78 /* CKJSONEngine.m */,
43A2108A116DEB3900BA930A /* Library */,
);
name = JSON;
sourceTree = "<group>";
};
43A20DA2116DC5B000BA930A /* XML */ = {
isa = PBXGroup;
children = (
);
name = XML;
sourceTree = "<group>";
};
43A20FD4116DD8F900BA930A /* Routes */ = {
isa = PBXGroup;
children = (
4317EFF61181DB850045FF78 /* CKRoutesEngine.h */,
4317F0001181DB850045FF78 /* CKRoutesEngine.m */,
);
name = Routes;
sourceTree = "<group>";
};
43A2107F116DEB2000BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A21086116DEB2B00BA930A /* Library */ = {
isa = PBXGroup;
children = (
43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
43A2108A116DEB3900BA930A /* Library */ = {
isa = PBXGroup;
children = (
431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */,
);
name = Library;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
D2AAC07A0554694100DB518D /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
4378EF7A1181D6AA004697B8 /* CloudKit_Prefix.pch in Headers */,
4317EFED1181DB510045FF78 /* CloudKit.h in Headers */,
4317F0041181DB850045FF78 /* CKCloudKitManager.h in Headers */,
4317F0051181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.h in Headers */,
4317F0071181DB850045FF78 /* CKJSONEngine.h in Headers */,
4317F0081181DB850045FF78 /* CKOAuthEngine.h in Headers */,
4317F0091181DB850045FF78 /* CKRequestManager.h in Headers */,
4317F00A1181DB850045FF78 /* CKRequestOperation.h in Headers */,
4317F00B1181DB850045FF78 /* CKRoutesEngine.h in Headers */,
4317F00D1181DB850045FF78 /* NSData+CloudKitAdditions.h in Headers */,
4317F00E1181DB850045FF78 /* NSString+InflectionSupport.h in Headers */,
435A08CE1191C14A00030F4C /* CKEngine.h in Headers */,
431C7F5E11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.h in Headers */,
4305391C11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.h in Headers */,
+ 438E39B911A5834F0028F47F /* CKDictionarizerEngine.h in Headers */,
+ 438E3A6B11A595740028F47F /* CKRequestDelegate.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
D2AAC07D0554694100DB518D /* CloudKit */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */;
buildPhases = (
D2AAC07A0554694100DB518D /* Headers */,
D2AAC07B0554694100DB518D /* Sources */,
D2AAC07C0554694100DB518D /* Frameworks */,
);
buildRules = (
);
dependencies = (
4317F12A1181E22F0045FF78 /* PBXTargetDependency */,
4317F12C1181E2320045FF78 /* PBXTargetDependency */,
431C7DB611A40525004F2B13 /* PBXTargetDependency */,
);
name = CloudKit;
productName = CloudKit;
productReference = D2AAC07E0554694100DB518D /* libCloudKit.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
ORGANIZATIONNAME = scrumers;
};
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* CloudKit */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 4317F0E51181E0B80045FF78 /* Products */;
ProjectRef = 43A20FE9116DDC3800BA930A /* FBConnect.xcodeproj */;
},
{
ProductGroup = 4317F0ED1181E0C70045FF78 /* Products */;
ProjectRef = 43A20D3C116DC1D700BA930A /* OAuthConsumer.xcodeproj */;
},
{
ProductGroup = 431C7D6F11A402FA004F2B13 /* Products */;
ProjectRef = 431C7D6E11A402FA004F2B13 /* TouchJSON.xcodeproj */;
},
);
projectRoot = "";
targets = (
D2AAC07D0554694100DB518D /* CloudKit */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
4317F0E91181E0B80045FF78 /* libFBPlatform.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libFBPlatform.a;
remoteRef = 4317F0E81181E0B80045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
4317F0F11181E0C70045FF78 /* libOAuthConsumer.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libOAuthConsumer.a;
remoteRef = 4317F0F01181E0C70045FF78 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
431C7D7611A402FA004F2B13 /* libTouchJSON.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libTouchJSON.a;
remoteRef = 431C7D7511A402FA004F2B13 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXSourcesBuildPhase section */
D2AAC07B0554694100DB518D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
4317F00F1181DB850045FF78 /* CKCloudKitManager.m in Sources */,
4317F0101181DB850045FF78 /* CKHTTPBasicAuthenticationEngine.m in Sources */,
4317F0111181DB850045FF78 /* CKJSONEngine.m in Sources */,
4317F0121181DB850045FF78 /* CKOAuthEngine.m in Sources */,
4317F0131181DB850045FF78 /* CKRequestManager.m in Sources */,
4317F0141181DB850045FF78 /* CKRequestOperation.m in Sources */,
4317F0151181DB850045FF78 /* CKRoutesEngine.m in Sources */,
4317F0161181DB850045FF78 /* NSData+CloudKitAdditions.m in Sources */,
4317F0171181DB850045FF78 /* NSString+InflectionSupport.m in Sources */,
431C7F5F11A41D93004F2B13 /* NSDictionary+CloudKitAdditions.m in Sources */,
4305391D11A535C8003C39C8 /* NSMutableArray+CloudKitAdditions.m in Sources */,
+ 438E39BA11A5834F0028F47F /* CKDictionarizerEngine.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
4317F12A1181E22F0045FF78 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = FBPlatform;
targetProxy = 4317F1291181E22F0045FF78 /* PBXContainerItemProxy */;
};
4317F12C1181E2320045FF78 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = OAuthConsumer;
targetProxy = 4317F12B1181E2320045FF78 /* PBXContainerItemProxy */;
};
431C7DB611A40525004F2B13 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = TouchJSON;
targetProxy = 431C7DB511A40525004F2B13 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
1DEB921F08733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
DSTROOT = /tmp/CloudKit.dst;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
PRODUCT_NAME = CloudKit;
};
name = Debug;
};
1DEB922008733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
DSTROOT = /tmp/CloudKit.dst;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CloudKit_Prefix.pch;
INSTALL_PATH = /usr/local/lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL\"",
"\"$(SRCROOT)/../../lib/YAJL-objc\"",
"\"$(SRCROOT)/../../lib/YAJL-objc/bin\"",
);
PRODUCT_NAME = CloudKit;
};
name = Release;
};
1DEB922308733DC00010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"./../../lib/touchjson-objc/src//**",
"./../../lib/oauth-objc/src//**",
"./../../lib/fbconnect-objc/src//**",
);
OTHER_LDFLAGS = (
"-ObjC",
"-all_load",
);
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Debug;
};
1DEB922408733DC00010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "-ObjC";
PREBINDING = NO;
SDKROOT = iphoneos4.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB921E08733DC00010E9CD /* Build configuration list for PBXNativeTarget "CloudKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB921F08733DC00010E9CD /* Debug */,
1DEB922008733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "CloudKit" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB922308733DC00010E9CD /* Debug */,
1DEB922408733DC00010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}
diff --git a/src/CKDictionarizerEngine.h b/src/CKDictionarizerEngine.h
new file mode 100644
index 0000000..70ea32d
--- /dev/null
+++ b/src/CKDictionarizerEngine.h
@@ -0,0 +1,23 @@
+//
+// CKDictionarizerEngine.h
+// CloudKit
+//
+// Created by Ludovic Galabru on 5/20/10.
+// Copyright 2010 scrumers. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "CKEngine.h"
+
+@interface CKDictionarizerEngine : NSObject <CKEngine> {
+ NSString *_localPrefix;
+}
+
+- (id)initWithLocalPrefix:(NSString *)localPrefix;
+
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
+
+@property(nonatomic, retain) NSString *localPrefix;
+
+@end
diff --git a/src/CKDictionarizerEngine.m b/src/CKDictionarizerEngine.m
new file mode 100644
index 0000000..9a25c62
--- /dev/null
+++ b/src/CKDictionarizerEngine.m
@@ -0,0 +1,137 @@
+//
+// CKDictionarizerEngine.m
+// CloudKit
+//
+// Created by Ludovic Galabru on 5/20/10.
+// Copyright 2010 scrumers. All rights reserved.
+//
+
+#import "CKDictionarizerEngine.h"
+#import "objc/runtime.h"
+#import "NSString+InflectionSupport.h"
+
+
+@interface CKDictionarizerEngine (Private)
+
+- (NSString *)localClassnameFor:(NSString *)classname;
+- (NSString *)remoteClassnameFor:(NSString *)classname;
+
+- (id)objectFromDictionary:(NSDictionary *)dictionary;
+- (NSArray *)objectsFromDictionaries:(NSArray *)array;
+
+- (NSDictionary *)dictionaryFromObject:(id)object;
+- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects;
+
+@end
+
+@implementation CKDictionarizerEngine
+
+@synthesize
+localPrefix= _localPrefix;
+
+- (id)initWithLocalPrefix:(NSString *)localPrefix {
+ self = [super init];
+ if (self != nil) {
+ self.localPrefix= localPrefix;
+ }
+ return self;
+}
+
+- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
+ id rawBody= [params valueForKey:@"HTTPBody"];
+ if (rawBody != nil) {
+ NSDictionary *processedBody;
+ if ([rawBody isKindOfClass:[NSArray class]]) {
+ processedBody= [self dictionaryFromObjects:rawBody];
+ } else {
+ processedBody= [self dictionaryFromObject:rawBody];
+ }
+ [*request setHTTPBody:processedBody];
+ }
+}
+
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error; {
+ if (*data != nil) {
+ if ([*data isKindOfClass:[NSArray class]]) {
+ *data= [self objectsFromDictionaries:*data];
+ } else {
+ *data= [self objectFromDictionary:*data];
+ }
+ }
+}
+
+
+- (id)objectFromDictionary:(NSDictionary *)dictionary {
+ id remoteObject, localObject;
+ NSString *remoteClassname, *localClassname;
+
+ remoteClassname= [[dictionary allKeys] lastObject];
+ remoteObject= [dictionary valueForKey:remoteClassname];
+
+ localClassname= [self localClassnameFor:remoteClassname];
+ localObject= [[NSClassFromString(localClassname) alloc] init];
+ for (id remoteAttribute in [remoteObject allKeys]) {
+ NSString *localAttribute= [[NSString stringWithFormat:@"set_%@:", remoteAttribute] camelize];
+ if ([localObject respondsToSelector:NSSelectorFromString(localAttribute)]) {
+ [localObject performSelector:NSSelectorFromString(localAttribute)
+ withObject:[remoteObject valueForKey:remoteAttribute]];
+ }
+ }
+ return localObject;
+}
+
+- (NSArray *)objectsFromDictionaries:(NSArray *)array {
+ NSMutableArray *objects= [NSMutableArray array];
+ for (id object in array) {
+ [objects addObject:[self objectFromDictionary:object]];
+ }
+ return objects;
+}
+
+- (NSDictionary *)dictionaryFromObject:(id)object {
+ NSMutableDictionary *dict= nil;
+ if ([object respondsToSelector:@selector(toDictionary)]) {
+ dict= [object performSelector:@selector(toDictionary)];
+ } else {
+ dict = [NSMutableDictionary dictionary];
+ unsigned int outCount;
+ objc_property_t *propList = class_copyPropertyList([object class], &outCount);
+ NSString *propertyName;
+ for (int i = 0; i < outCount; i++) {
+ objc_property_t * prop = propList + i;
+ propertyName = [NSString stringWithCString:property_getName(*prop) encoding:NSUTF8StringEncoding];
+ if ([object respondsToSelector:NSSelectorFromString(propertyName)]) {
+ //NSString *type = [NSString stringWithCString:property_getAttributes(*prop) encoding:NSUTF8StringEncoding];
+ [dict setValue:[object performSelector:NSSelectorFromString(propertyName)] forKey:propertyName];
+ }
+ }
+ free(propList);
+ }
+ return dict;
+}
+
+- (NSDictionary *)dictionaryFromObjects:(NSArray *)objects {
+ return nil;
+}
+
+- (NSString *)localClassnameFor:(NSString *)classname {
+ NSString *result = [classname camelize];
+ result = [result stringByReplacingCharactersInRange:NSMakeRange(0,1)
+ withString:[[result substringWithRange:NSMakeRange(0,1)] uppercaseString]];
+ if (self.localPrefix!=nil) {
+ result = [self.localPrefix stringByAppendingString:result];
+ }
+ return result;
+}
+
+- (NSString *)remoteClassnameFor:(NSString *)classname {
+
+ return ;
+}
+
+- (void) dealloc {
+ [_localPrefix release];
+ [super dealloc];
+}
+
+@end
diff --git a/src/CKHTTPBasicAuthenticationEngine.h b/src/CKHTTPBasicAuthenticationEngine.h
index b89f03b..f06578a 100644
--- a/src/CKHTTPBasicAuthenticationEngine.h
+++ b/src/CKHTTPBasicAuthenticationEngine.h
@@ -1,22 +1,22 @@
//
// SHTTPBasicAuthenticationEngine.h
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKHTTPBasicAuthenticationEngine : NSObject<CKEngine> {
NSString *_username, *_password, *_basic_authorization;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data;
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@property(nonatomic, retain) NSString *username, *password, *basic_authorization;
@end
diff --git a/src/CKHTTPBasicAuthenticationEngine.m b/src/CKHTTPBasicAuthenticationEngine.m
index 6ea9b40..99450d2 100644
--- a/src/CKHTTPBasicAuthenticationEngine.m
+++ b/src/CKHTTPBasicAuthenticationEngine.m
@@ -1,52 +1,52 @@
//
// SHTTPBasicAuthenticationEngine.m
// Sprints
//
// Created by Ludovic Galabru on 07/04/10.
// Copyright 2010 Scrumers. All rights reserved.
//
#import "CKHTTPBasicAuthenticationEngine.h"
#import "NSData+CloudKitAdditions.h"
@interface CKHTTPBasicAuthenticationEngine (Private)
@end
@implementation CKHTTPBasicAuthenticationEngine
@synthesize
username= _username,
password= _password,
basic_authorization= _basic_authorization;
- (id)init {
self = [super init];
if (self != nil) {
}
return self;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
if (self.basic_authorization == nil) {
NSData *encodedCredentials;
encodedCredentials= [[NSString stringWithFormat:@"%@:%@", self.username, self.password] dataUsingEncoding:NSASCIIStringEncoding];
self.basic_authorization= [NSString stringWithFormat:@"Basic %@", [NSData base64forData:encodedCredentials]];
}
[*request addValue:self.basic_authorization forHTTPHeaderField:@"Authorization"];
}
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data {
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (void) dealloc {
[_username release];
[_password release];
[_basic_authorization release];
[super dealloc];
}
@end
diff --git a/src/CKJSONEngine.h b/src/CKJSONEngine.h
index adfb735..2941cae 100644
--- a/src/CKJSONEngine.h
+++ b/src/CKJSONEngine.h
@@ -1,27 +1,19 @@
//
// CKJSONEngine.h
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKJSONEngine : NSObject <CKEngine> {
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data;
-
-- (NSString *)serializeObject:(id)inObject;
-- (NSString *)serializeArray:(NSArray *)inArray;
-- (NSString *)serializeDictionary:(NSDictionary *)inDictionary;
-
-- (id)deserialize:(NSData *)inData error:(NSError **)outError;
-- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError;
-- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError;
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKJSONEngine.m b/src/CKJSONEngine.m
index b1e18d3..f86dfc0 100644
--- a/src/CKJSONEngine.m
+++ b/src/CKJSONEngine.m
@@ -1,53 +1,63 @@
//
// CKJSONEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import "CKJSONEngine.h"
#import "TouchJSON/TouchJSON.h"
+@interface CKJSONEngine (Private)
+
+- (NSString *)serializeObject:(id)inObject;
+- (NSString *)serializeArray:(NSArray *)inArray;
+- (NSString *)serializeDictionary:(NSDictionary *)inDictionary;
+
+- (id)deserialize:(NSData *)inData error:(NSError **)outError;
+- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError;
+- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError;
+
+@end
+
@implementation CKJSONEngine
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
NSString *path;
path= [[[*request URL] absoluteString] stringByAppendingString:@".json"];
[*request setURL:[NSURL URLWithString:path]];
[*request addValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
}
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data {
- NSError *error= nil;
- *data= [self deserialize:*data error:&error];
- NSLog(@"Response:%@", *data);
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
+ *data= [self deserialize:*data error:error];
}
- (NSString *)serializeObject:(id)inObject {
return [[CJSONSerializer serializer] serializeObject:inObject];
}
- (NSString *)serializeArray:(NSArray *)inArray {
return [[CJSONSerializer serializer] serializeArray:inArray];
}
- (NSString *)serializeDictionary:(NSDictionary *)inDictionary {
return [[CJSONSerializer serializer] serializeDictionary:inDictionary];
}
- (id)deserialize:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserialize:inData error:outError];
}
- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsDictionary:inData error:outError];
}
- (id)deserializeAsArray:(NSData *)inData error:(NSError **)outError {
return [[CJSONDeserializer deserializer] deserializeAsArray:inData error:outError];
}
@end
diff --git a/src/CKRequestDelegate.h b/src/CKRequestDelegate.h
new file mode 100644
index 0000000..d01e3ca
--- /dev/null
+++ b/src/CKRequestDelegate.h
@@ -0,0 +1,17 @@
+//
+// CKRequestResponderDelegate.h
+// CloudKit
+//
+// Created by Ludovic Galabru on 5/20/10.
+// Copyright 2010 scrumers. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@protocol CKRequestDelegate
+
+- (void)request:(NSMutableURLRequest *)request didFailWithError:(NSError *)error;
+- (void)request:(NSMutableURLRequest *)request didSucceedWithData:(id)data;
+
+@end
\ No newline at end of file
diff --git a/src/CKRequestOperation.h b/src/CKRequestOperation.h
index 89383a1..6bc4f4f 100644
--- a/src/CKRequestOperation.h
+++ b/src/CKRequestOperation.h
@@ -1,32 +1,33 @@
//
// CKRequestOperation.h
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CKCloudKitManager;
+@protocol CKRequestDelegate;
+
@interface CKRequestOperation : NSOperation {
NSMutableURLRequest * request;
- id delegate;
+ id<CKRequestDelegate> delegate;
CKCloudKitManager *configuration;
NSDictionary *params;
NSData * data;
- NSError * error;
}
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andConfiguration:(CKCloudKitManager *)inConfiguration;
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andCongiguration:(CKCloudKitManager *)inConfiguration;
@end
diff --git a/src/CKRequestOperation.m b/src/CKRequestOperation.m
index 87b6103..69b2414 100644
--- a/src/CKRequestOperation.m
+++ b/src/CKRequestOperation.m
@@ -1,74 +1,93 @@
//
// CKRequestOperation.m
// Scrumers
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import "CKRequestOperation.h"
#import "CKCloudKitManager.h"
#import "CKEngine.h"
@implementation CKRequestOperation
- (id)initWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andConfiguration:(CKCloudKitManager *)inConfiguration {
self = [super init];
if (self != nil) {
request = [inRequest retain];
delegate = [inDelegate retain];
configuration= [inConfiguration retain];
params= [inParams retain];
}
return self;
}
+ (id)operationWithRequest:(NSMutableURLRequest *)inRequest
params:(NSDictionary *)inParams
delegate:(id)inDelegate
andCongiguration:(CKCloudKitManager *)inConfiguration {
CKRequestOperation *operation;
operation = [[CKRequestOperation alloc] initWithRequest:inRequest
params:inParams
delegate:inDelegate
andConfiguration:inConfiguration];
return [operation autorelease];
}
- (void)main {
- error = nil;
+ NSError *error = nil;
NSArray *ordered_engines= [configuration ordered_engines];
for (id engine_name in ordered_engines) {
id<CKEngine> engine= [configuration engineForKey:engine_name];
[engine processRequest:&request withParams:params];
}
NSHTTPURLResponse * response;
id rawData = [NSURLConnection sendSynchronousRequest:request
returningResponse:&response
error:&error];
- if (response.statusCode > 400) {
- //errors
- } else {
+
+ if (response.statusCode < 400 && error == nil) {
for (int index= [ordered_engines count]-1; index >= 0; index--) {
id<CKEngine> engine= [configuration engineForKey:[ordered_engines objectAtIndex:index]];
[engine processResponse:&response
withParams:params
- andData:&rawData];
+ data:&rawData
+ andError:&error];
}
+ } else if (response.statusCode > 400) {
+ //errors handling
+ }
+ if (error == nil) {
+ [self performSelectorOnMainThread:@selector(requestDidSucceedWithData:)
+ withObject:rawData
+ waitUntilDone:YES];
+ } else {
+ [self performSelectorOnMainThread:@selector(requestDidFailWithError:)
+ withObject:error
+ waitUntilDone:YES];
}
}
+- (void)requestDidFailWithError:(NSError *)error {
+ [delegate request:request didFailWithError:error];
+}
+
+- (void)requestDidSucceedWithData:(id)response {
+ [delegate request:request didSucceedWithData:response];
+}
+
- (void)dealloc {
[data release];
[request release];
[delegate release];
[super dealloc];
}
@end
diff --git a/src/CKRoutesEngine.h b/src/CKRoutesEngine.h
index 0eb042a..9ec7e4a 100644
--- a/src/CKRoutesEngine.h
+++ b/src/CKRoutesEngine.h
@@ -1,28 +1,21 @@
//
// CKRoutesEngine.h
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CKEngine.h"
@interface CKRoutesEngine : NSObject<CKEngine> {
NSDictionary *routes, *constants;
}
- (id)initWithRoutesURL:(NSURL *)URL;
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params;
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data;
-
-- (NSURL *)URLForKey:(NSString *)key;
-- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
-- (NSString *)HTTPMethodForKey:(NSString *)key;
-
-- (NSMutableURLRequest *)requestForKey:(NSString *)key;
-- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error;
@end
diff --git a/src/CKRoutesEngine.m b/src/CKRoutesEngine.m
index f2b4c3e..4fbd8ed 100644
--- a/src/CKRoutesEngine.m
+++ b/src/CKRoutesEngine.m
@@ -1,111 +1,122 @@
//
// CKRoutesEngine.m
// CloudKit
//
// Created by Ludovic Galabru on 08/04/10.
// Copyright 2010 Software Engineering Task Force. All rights reserved.
//
#import "CKRoutesEngine.h"
#import "NSDictionary+CloudKitAdditions.h"
#import "NSMutableArray+CloudKitAdditions.h"
+@interface CKRoutesEngine (Private)
+
+- (NSURL *)URLForKey:(NSString *)key;
+- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
+- (NSString *)HTTPMethodForKey:(NSString *)key;
+
+- (NSMutableURLRequest *)requestForKey:(NSString *)key;
+- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants;
+
+@end
+
@implementation CKRoutesEngine
- (id)init {
self = [super init];
if (self != nil) {
}
return self;
}
- (id)initWithRoutesURL:(NSURL *)URL {
self = [self init];
if (self != nil) {
NSDictionary* plist;
plist= [NSDictionary dictionaryWithContentsOfURL:URL];
routes= [[NSDictionary alloc] initWithDictionary:[plist valueForKey:@"routes"]];
constants= [[NSDictionary alloc] initWithDictionary:[plist valueForKey:@"constants"]];
}
return self;
}
- (void)processRequest:(NSMutableURLRequest **)request withParams:(NSDictionary *)params {
NSString *keyURL= [[*request URL] absoluteString];
NSURL *processedURL= [self URLForKey:keyURL withDictionary:params];
[*request setURL:processedURL];
NSString *method= [self HTTPMethodForKey:keyURL];
if (method != nil) {
[*request setHTTPMethod:method];
}
}
-- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params andData:(id *)data {
+- (void)processResponse:(NSHTTPURLResponse **)response withParams:(NSDictionary *)params data:(id *)data andError:(NSError **)error {
}
- (NSURL *)URLForKey:(NSString *)key {
return [self URLForKey:key withDictionary:nil];
}
- (NSString *)HTTPMethodForKey:(NSString *)key {
NSString *method;
method= [[routes valueForKey:key] valueForKey:@"method"];
return method;
}
- (NSURL *)URLForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants {
NSString *rawPath, *processedPath;
NSDictionary *temporaryConstants;
NSURL *processedURL;
temporaryConstants= [NSDictionary dictionaryWithDictionary:constants
andDictionary:newConstants];
rawPath= [[routes valueForKey:key] valueForKey:@"url"];
NSMutableArray *rawComponents= [NSMutableArray arrayWithArray:[rawPath componentsSeparatedByString:@"/"]];
[rawComponents removeEmptyStrings];
NSMutableArray *processedComponents= [NSMutableArray array];
for (id rawComponent in rawComponents) {
NSArray *rawSubComponents= [rawComponent componentsSeparatedByString:@"."];
NSMutableArray *processedSubComponents= [NSMutableArray array];
for (id rawSubComponent in rawSubComponents) {
if (![rawSubComponent isEqualToString:@""]) {
if ([rawSubComponent characterAtIndex:0] == ':') {
NSString *processedSubComponent= [temporaryConstants valueForKey:[rawSubComponent substringFromIndex:1]];
if (processedSubComponent != nil) {
[processedSubComponents addObject:processedSubComponent];
}
} else {
[processedSubComponents addObject:rawSubComponent];
}
}
}
[processedComponents removeEmptyStrings];
[processedComponents addObject:[processedSubComponents componentsJoinedByString:@"."]];
}
processedPath= [processedComponents componentsJoinedByString:@"/"];
processedURL= [NSURL URLWithString:[NSString stringWithFormat:@"http://%@", processedPath]];
return processedURL;
}
- (NSMutableURLRequest *)requestForKey:(NSString *)key {
return [self requestForKey:key withDictionary:nil];
}
- (NSMutableURLRequest *)requestForKey:(NSString *)key withDictionary:(NSDictionary *)newConstants {
NSMutableURLRequest *request;
request= [[NSMutableURLRequest alloc] initWithURL:[self URLForKey:key
withDictionary:newConstants]];
NSString *method;
method= [self HTTPMethodForKey:key];
if (method != nil) {
[request setHTTPMethod:method];
}
return request;
}
- (void) dealloc {
[super dealloc];
}
@end
diff --git a/src/CloudKit/CloudKit.h b/src/CloudKit/CloudKit.h
index eebccc8..58d13fd 100644
--- a/src/CloudKit/CloudKit.h
+++ b/src/CloudKit/CloudKit.h
@@ -1,19 +1,21 @@
//
// CloudKit.h
// CloudKit
//
// Created by Ludovic Galabru on 27/07/09.
// Copyright 2009 Scrumers. All rights reserved.
//
#import "CKCloudKitManager.h"
#import "CKRequestManager.h"
#import "CKRequestOperation.h"
#import "CKHTTPBasicAuthenticationEngine.h"
#import "CKOAuthEngine.h"
#import "CKJSONEngine.h"
#import "CKRoutesEngine.h"
+#import "CKDictionarizerEngine.h"
-#import "CKEngine.h"
\ No newline at end of file
+#import "CKEngine.h"
+#import "CKRequestDelegate.h"
\ No newline at end of file
diff --git a/platform/iPhone/HTTPStatus.strings b/src/HTTPStatus.strings
similarity index 100%
rename from platform/iPhone/HTTPStatus.strings
rename to src/HTTPStatus.strings
diff --git a/platform/iPhone/NSDictionary+CloudKitAdditions.h b/src/NSDictionary+CloudKitAdditions.h
similarity index 100%
rename from platform/iPhone/NSDictionary+CloudKitAdditions.h
rename to src/NSDictionary+CloudKitAdditions.h
diff --git a/platform/iPhone/NSDictionary+CloudKitAdditions.m b/src/NSDictionary+CloudKitAdditions.m
similarity index 100%
rename from platform/iPhone/NSDictionary+CloudKitAdditions.m
rename to src/NSDictionary+CloudKitAdditions.m
diff --git a/platform/iPhone/NSMutableArray+CloudKitAdditions.h b/src/NSMutableArray+CloudKitAdditions.h
similarity index 100%
rename from platform/iPhone/NSMutableArray+CloudKitAdditions.h
rename to src/NSMutableArray+CloudKitAdditions.h
diff --git a/platform/iPhone/NSMutableArray+CloudKitAdditions.m b/src/NSMutableArray+CloudKitAdditions.m
similarity index 100%
rename from platform/iPhone/NSMutableArray+CloudKitAdditions.m
rename to src/NSMutableArray+CloudKitAdditions.m
|
scrumers/CoreCloud
|
2704e48afc9008aedc59f22f87bf40a23e9085f0
|
.DS_Store removed and ignored
|
diff --git a/.DS_Store b/.DS_Store
deleted file mode 100644
index 5e3724f..0000000
Binary files a/.DS_Store and /dev/null differ
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..496ee2c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_Store
\ No newline at end of file
diff --git a/lib/.DS_Store b/lib/.DS_Store
deleted file mode 100644
index b15f56f..0000000
Binary files a/lib/.DS_Store and /dev/null differ
diff --git a/src/.DS_Store b/src/.DS_Store
deleted file mode 100644
index 0762574..0000000
Binary files a/src/.DS_Store and /dev/null differ
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.