Comments (8)
I will add this to the feature request. One question, how would it be used? could you give me an example of how it should be implemented?
from tismsview.
The Ti.UI.Button has an enabled
boolean that you can change. I've used this in the past to disable some functionality when it's temporary unavailable to the user. For example in this case, I would set the button to enabled: false
, bind to the change
event on the textArea
and then have it set to enabled: true
when the textArea
has some input.
Since the send button in this case isn't exposed as a view, you could create a property on the textArea:
textArea.sendButtonEnabled = true; // default
from tismsview.
Will do, thanks for the idea!
from tismsview.
@pec1985 Is it possible to set a new it to "true" later on using the property, or do I have to use the method?
var conversationView = Ti.Pedro.createSMSView({
sendButtonEnabled: false;
});
conversationView.addEventListener('change', function(e) {
if ( e.value ) {
e.source.sendButtonEnabled = true;
}
});
Also, "setSendButtonDissabled", disabled is with one "s".
from tismsview.
Same thing, you can do "setSendButtonDissabled()" or ".sendButtonDissabled = "
But, does it matter?
from tismsview.
No, not really, I'm just not a fan of getters/setters.
from tismsview.
Being a fan or not of getters and setters has nothing to do with the issue.
setSomething(x)
and something = x
is the same exact thing, so either way you are calling a setter, no way around this.
For example, to populate a tableView in Titanium:
tableView.setData( array );
// or
tableView.data = array;
Getters and Setters are fun
:)
from tismsview.
Oh, and Dissabled is with one "s", thanks for that, oops
Fixed in 73685f3
from tismsview.
Related Issues (20)
- Message bubbles are not showing 2x HOT 1
- addLabel in recent version? HOT 2
- Installing on iOS device produces error HOT 6
- App is crashing
- Crash with iOS 5 SDK HOT 4
- Can expandable textarea be used by itself (no bubble chat)? HOT 21
- Object as the message. HOT 2
- Exclamation button to resend HOT 2
- Standalone version of expandable TextArea HOT 2
- Bubble width
- Send button not variable in width
- when you load messages that go over the height of the page, it doesn't scroll to the bottom HOT 1
- scrollbar doesn't appear in iPad HOT 2
- scrolling randomly not working HOT 3
- addLabel custom HOT 1
- Save and retrieve from database
- how to add a image to the textArea.recieveMessage() HOT 2
- How to change conversation layout? HOT 3
- Latest builds - Breaks on require()
- assets property not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tismsview.