-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TIMOB-9390: Blackberry: implement rest of String.formatXXX methods (other than format) #76
Changes from 6 commits
959eecc
4c3ab30
3c9409d
99130f8
a891e9c
8c9c499
ba505e6
e9f27f7
4510b27
014c5fd
0db5658
05bcf56
64d3732
ba500af
7f61a26
e9d0fa3
44dd635
16eb9a4
1fe0911
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#include "TiDateObject.h" | ||
|
||
TiDateObject::TiDateObject(NativeObjectFactory* objectFactory) | ||
: TiObject("Date") | ||
{ | ||
objectFactory_ = objectFactory; | ||
} | ||
|
||
TiDateObject::~TiDateObject() | ||
{ | ||
} | ||
|
||
void TiDateObject::addObjectToParent(TiObject* parent, NativeObjectFactory* objectFactory) | ||
{ | ||
TiDateObject* obj = new TiDateObject(objectFactory); | ||
parent->addMember(obj); | ||
obj->release(); | ||
} | ||
|
||
void TiDateObject::onCreateStaticMembers() | ||
{ | ||
} | ||
|
||
bool TiDateObject::canAddMembers() const | ||
{ | ||
return false; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#ifndef TIDATEOBJECT_H_ | ||
#define TIDATEOBJECT_H_ | ||
|
||
#include "TiObject.h" | ||
|
||
/* | ||
* TiDateObject | ||
*/ | ||
class TiDateObject : public TiObject | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this class for? It doesn't seem to serve any purpose There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our framework doesn't know about Date type. This class is for that purpose. Maybe there is another solution for that, but without it it got crashed with var date = new Date(); statement. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an issue with the framework. Dave is working on this timob-9398. I'm a bit surprised that it needs to name to be defined, but then the resulting object is the actual built in Date object. In all events this shouldn't be needed in the future, so i suggest waiting for 9398 to complete this patch. |
||
{ | ||
public: | ||
static void addObjectToParent(TiObject* parent, NativeObjectFactory* objectFactory); | ||
|
||
protected: | ||
virtual ~TiDateObject(); | ||
virtual void onCreateStaticMembers(); | ||
virtual bool canAddMembers() const; | ||
|
||
private: | ||
explicit TiDateObject(); | ||
explicit TiDateObject(NativeObjectFactory* objectFactory); | ||
|
||
/* Not copiable; Not assignable */ | ||
TiDateObject(const TiDateObject& date); | ||
TiDateObject& operator=(const TiDateObject& date); | ||
|
||
NativeObjectFactory* objectFactory_; | ||
}; | ||
|
||
#endif /* TIDATEOBJECT_H_ */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#define TIMESSAGESTRINGS_DEF_VALUE | ||
#include "TiMessageStrings.h" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2009-2012 by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
|
||
#ifndef TIMESSAGESTRINGS_H_ | ||
#define TIMESSAGESTRINGS_H_ | ||
|
||
// Single file to contain the message strings | ||
|
||
#ifdef TIMESSAGESTRINGS_DEF_VALUE | ||
#define TIMESSAGESTRINGS_CONST_DEF(T,N,V) const T N=V | ||
#else // TIMESSAGESTRINGS_DEF_VALUE | ||
#define TIMESSAGESTRINGS_CONST_DEF(T,N,V) extern const T N | ||
#endif // TIMESSAGESTRINGS_DEF_VALUE | ||
|
||
namespace Ti | ||
{ | ||
namespace Msg | ||
{ | ||
|
||
TIMESSAGESTRINGS_CONST_DEF(char*, Expected_argument_of_type_double, "Expected argument of type double"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, Expected_argument_of_type_integer, "Expected argument of type integer"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, Expected_argument_of_type_object_or_external, "Expected argument of type object or external"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, Expected_argument_of_type_string, "Expected argument of type string"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, Expected_argument_of_type_date, "Expected argument of type date"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, Expected_argument_of_type_unsigned_integer, "Expected argument of type unsigned integer"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, INTERNAL__An_error_occurred_while_parsing_the_format_string, "INTERNAL: An error occurred while parsing the format string"); | ||
|
||
TIMESSAGESTRINGS_CONST_DEF(char*, Missing_argument, "Missing argument"); | ||
TIMESSAGESTRINGS_CONST_DEF(char*, Too_many_arguments, "Too many arguments"); | ||
|
||
} | ||
} | ||
|
||
#endif // TIMESSAGESTRINGS_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be used anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed