Code Monkey home page Code Monkey logo

tismsview's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tismsview's Issues

Support landscape view

I want to use this in an iPad app, but currently it does not support landscape view. The textArea toolbar disappears when rotated to landscape.

Message bubble padding

The padding on the message bubble is not the same on each side. You can see that there's more space on the left than the right side.

message bubble margin issue

Screenshot from the Message app on how the padding should be:
message bubble padding

Bug in "assets" property

If the "assets" property is missing, the module will not find the smsview.bundle.

If that property is missing, the module has to look for the smsview.bundle in the Resources directory by default.

maxLines overflow

If I specify maxLines: 5 or higher in the textArea it will expand beyond it's view when in landscape orientation on iPhone.
Make sure min-maxLines never go higher than the navBar.

overflow example

label margin

The label should have some margin on the sides. Currently it fills the screen width.

Does not work well in a tab window

There is still a bug that the first message, sent or received, will not appear on the screen, but 40 pixels up (offscreen)

Gotta look into it.

textArea scroll position changes after rotation

If I write some lines in the textArea when in landscape, and then rotate to portrait, the scroll position is suddenly at the top of the textArea and not at the bottom as it should be.

Landscape:
landscape

Portrait:
portrait

Disable send button

Can you add the ability to disable/enable the send button?

Just like the SMS app. I don't want the user to be able to click the button if there is no text in the textArea.

textArea max height

Since the iPad has a lot more screen real estate than the iPhone. It would be useful to have a property on the textArea to set the max height it's allowed to expand. Right now it expands to about 4 lines.

Installing on iOS device produces error

In simulator everything looks fine, but installing the app with Ti.SmsView on device, it produces

[ERROR] Error: Traceback (most recent call last):
  File "/Users/sebastian/Library/Application Support/Titanium/mobilesdk/osx/1.7.3/iphone/builder.py", line 1305, in main
    execute_xcode("iphoneos%s" % iphone_version,args,False)
  File "/Users/sebastian/Library/Application Support/Titanium/mobilesdk/osx/1.7.3/iphone/builder.py", line 1066, in execute_xcode
    output = run.run(args,False,False,o)
  File "/Users/sebastian/Library/Application Support/Titanium/mobilesdk/osx/1.7.3/iphone/run.py", line 39, in run
    sys.exit(rc)
SystemExit: 65

on build

Crash with iOS 5 SDK

When building the example app (commit 9f56bfa) with the iOS 5 SDK it crashes. It works fine with 4.3.2.

Titanium Mobile SDK 1.7.3

Console dump:

[ERROR] The application has crashed with an unhandled exception. Stack trace:



0   CoreFoundation                      0x02e49052 __exceptionPreprocess + 178

1   libobjc.A.dylib                     0x02c69d0a objc_exception_throw + 44

2   CoreFoundation                      0x02df1a78 +[NSException raise:format:arguments:] + 136

3   CoreFoundation                      0x02df19e9 +[NSException raise:format:] + 57

4   UIKit                               0x009ffda4 __windowForView + 158

5   UIKit                               0x00a01bf2 -[UIView(Hierarchy) _postMovedFromSuperview:] + 30

6   UIKit                               0x00a06a4f -[UIView(Internal) _addSubview:positioned:relativeTo:] + 1633

7   UIKit                               0x00a0072b -[UIView(Hierarchy) addSubview:] + 56

8   SMSViewTest                         0x0031fe9f -[PESMSTextArea layoutSubviews] + 275

9   UIKit                               0x00a08322 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 178

10  CoreFoundation                      0x02e4ae72 -[NSObject performSelector:withObject:] + 66

11  QuartzCore                          0x01cbc92d -[CALayer layoutSublayers] + 266

12  QuartzCore                          0x01cc6827 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 231

13  QuartzCore                          0x01c4cfa7 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 377

14  QuartzCore                          0x01c4eea6 _ZN2CA11Transaction6commitEv + 374

15  QuartzCore                          0x01c4e580 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 80

16  CoreFoundation                      0x02e1d9ce __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30

17  CoreFoundation                      0x02db4670 __CFRunLoopDoObservers + 384

18  CoreFoundation                      0x02d804f6 __CFRunLoopRun + 1174

19  CoreFoundation                      0x02d7fdb4 CFRunLoopRunSpecific + 212

20  CoreFoundation                      0x02d7fccb CFRunLoopRunInMode + 123

21  GraphicsServices                    0x0285d879 GSEventRunModal + 207

22  GraphicsServices                    0x0285d93e GSEventRun + 114

23  UIKit                               0x009c9a9b UIApplicationMain + 1175

24  SMSViewTest                         0x0000479a main + 442

25  SMSViewTest                         0x000030e5 start + 53





2011-10-29 19:27:27.999 SMSViewTest[5789:17603] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Requesting the window of a view (<UIButton: 0x8c06e40; frame = (0 0; 0 0); transform = [0, 0, 0, 0, 0, 0]; alpha = 0; opaque = NO; autoresize = TM; layer = (null)>) with a nil layer. This view probably hasn't received initWithFrame: or initWithCoder:.'

*** First throw call stack:

(0x2e49052 0x2c69d0a 0x2df1a78 0x2df19e9 0x9ffda4 0xa01bf2 0xa06a4f 0xa0072b 0x31fe9f 0xa08322 0x2e4ae72 0x1cbc92d 0x1cc6827 0x1c4cfa7 0x1c4eea6 0x1c4e580 0x2e1d9ce 0x2db4670 0x2d804f6 0x2d7fdb4 0x2d7fccb 0x285d879 0x285d93e 0x9c9a9b 0x479a 0x30e5)

terminate called throwing an exception
[DEBUG] App Spec: <DTiPhoneSimulatorApplicationSpecifier 0x100126f00> specified by path /Users/sindresorhus/Projects/Titanium/SMSViewTest/build/iphone/build/Debug-iphonesimulator/SMSViewTest.app
[DEBUG] SDK Root: <DTiPhoneSimulatorSystemRoot 0x100125fb0> path=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk version=5.0 name=Simulator - iOS 5.0
[DEBUG] using device family iphone
[DEBUG] Session started
[DEBUG] Session did end with error (null)
[INFO] Application has exited from Simulator

Can expandable textarea be used by itself (no bubble chat)?

Hi Pedro! Great work on the SMSview module. Is it possible to detach the keyboard toolbar elements (camera / textarea / send) from the bubble chat view in this module? I need to code a messaging element that will use the keyboard toolbar to allow the user to post a message (to a tableview, not bubble chats). Can your module be modified to do this? I'm not familiar with iPhone modules or Xcode to figure this one on my own. Any guidance you can provide is appreciated.

I opened a ticket (http://support.appcelerator.com/tickets/APP-258734/tickets) about trying to get something to work on the iPhone, and then noticed you posted a version of SMSview for Android that works great, but I need something for iPhone. Thanks!!!

Please update the Appcelerator Marketplace

In the Appcelerator Marketplace seems to be an old version. There isn't the "addLabel" function within. And I'm poorly not able to get my own compiled version running :-/

assets property default

The assets of property of textArea should default to the string assets for consistency, since every other property has a default value.

label should not be clickable

If I have the textArea focused and try to hit the view background to blur it and accidentally hit a label, nothing happens, since the label absorbs the click event. This should not happen.

Exclamation button to resend

If a message is not sent because of various issues, there should be a way to resend it just like the sms app.

background on sendButton is hidden

The background of the sendButton is hidden if the SMS view is created with the sendButtonDisabled is set to true.

var textArea = Ti.SMSView.createView({
    sendButtonDisabled: true
});

button disabled bug

Include source message view in the message click event

Can you include the source view of the message in the event object of the message click event?

On iPad OptionDialog needs a source view to know where to place the OptionDialog popover. I'm showing a OptionDialog when a message is clicked. I tried using event.source, but it seems to be the source view of the message table.

Race problem with sendMessage - receiveMessage

If I do a .receiveMessage() right after an .sendMessage(), the scrolling is set on the .sendMessage() and not on the last item .receiveMessage(), like it should, so the last .receiveMessage() is not shown, and I have to scroll to see it.

Label between messages

To make it even more like the built-in SMS app. You should add support for adding labels into the conversation. In the same style as the screenshot. There's a lot of use cases for this; like to separate conversation, add some additonal info, ...

Example:

addLabel('19. july 2011');
sendMessage('Lorem ipsum');

SMS app

saveMessages()

There is a method to load an array of messages. Could we also have a method that does the opposite?

To make the conversation persistent it would be useful if it was also possible to save the conversation to an array in the format it uses to load an array.

Bubble width

need a possibility to set the width of the bubbles. best practice would be in percent.

Standalone version of expandable TextArea

Hi,

I am looking for a standalone module. I don't need the complete sms view package, just a simple and effective way to integrate expandable textarea.

@pec1985 how can I contact you through github? Just get the message "pec1985 has not provided an email address". Would be great if you can drop me a line at [email protected]

Best
Danny

UI bug toolbar

There is an UI bug with the toolbar when running the example app on a physical iPhone. This doesn't happen in the simulator.

This happens when the textArea is focused:

ui bug

Tested with commit 78eb297

Object as the message.

It seems that right now only an image blob or a text is part of the messages. I would like to include a reference to an object. This way I can insert views with eventlisteners, to say, open a link or something like that.

Is there any easy way to do that?

Thanks

Hide the send-area

I have a feature request. In my app, I have a community messaging system. There I have an Incoming and an Outgoing mailbox. In the Outgoing mailbox I only want to show the messages, but not the possibilty to send a new one.

Is that possible to have a function: hideTextArea or something like that?

PSD of assets

If you have the PSD files for the assets. Would you consider releasing them?

Would be nice to be able to modify the assets.

Message bubble text style

There should be a way to style the text in the message bubbles.

Right now the font property only sets the font style for the textArea.

Maybe something like this:

var textArea = Ti.SMSView.createView({
    font: {
        fontSize: 14
    },
    messageFont: {
        fontSize: 16
    }   
});

font size

textArea focus on load

Is there a way to get the textArea to be focused when the app opens?

I've tried adding textArea.focus(); to the example app, but it just crashes:

2011-09-17 02:36:59.636 Nynorsk2[85673:18a07] bool _WebTryThreadLock(bool), 0x6b22c60: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...

It works if I focus the textArea in the window focus event:

win.addEventListener('focus', function() {
    textArea.focus();
});

But then it only focuses after the app has loaded, so it's a noticeable keyboard slideup animation.
Activating .focus() on the built-in textArea works without having to have it in the window focus event.

Can you try to fix this?

buttonTitle not working

Hello,

Thanks really much for your awesome module !

It works great but everytime I try to modify the button title my app simply crashes. Maybe it is due to the fact that i'm running iOS 5.

If you could help me out on this one, maybe it's all my fault

Bye!

addLabel in recent version?

After successful compiling the newest version of Ti.smsview, everthing looks fine. but..

I tried to use the addLabel function. The response is:

Result of expression 'smsView.addLabel' [undefined] is not a function.

Here is some code:

var smsView = Ti.SMSView.createView({
        //maxLines:6,               // <--- Defaults to 4
        //minLines:2,               // <--- Defaults to 1
        backgroundColor : config.backgroundColor, // <--- Defaults to #dae1eb
        assets : 'assets', // <--- Defaults to nothing, smsview.bundle can be places in the Resources dir
        // sendColor: 'Green',      // <--- Defaults to "Green"
        recieveColor : 'Gray', // <--- Defaults to "White"
        // selectedColor: 'Blue',   // <--- Defaults to "Blue"
        // editable: true,          // <--- Defaults to true, do no change it
        // animated: false,         // <--- Defaults to true
        // buttonTitle:L('send'),   // <--- Defaults to "Send"
        // font: { fontSize: 12 ... },  // <--- Defaults to... can't remember
        // autocorrect: false,      // <--- Defaults to true
        // textAlignment: 'left',   // <--- Defaults to left
        // textColor: 'blue',       // <--- Defaults to "black"
        returnType : Ti.SMSView.RETURNKEY_DONE // <---- Defaults to Ti.SMSView.RETURNKEY_DEFAULT
        // camButton : true             // <--- Defaults to false
    });

smsView.addEventListener('buttonClicked', function(e) {
        smsView.addLabel(new Date()+'');
        smsView.sendMessage(e.value);
    });

Message click event object

It would be useful to get the index of the message clicked and the type (send/recieve) in the message click event object.

buttonTitle attribute not working

I am using the following:

var textArea = Ti.Pedro.createSMSView({
backgroundColor: '#b7d4fa',
assets:'assets',
buttonTitle: 'Post',
autocorrect: true,
});

and the screen does not show the control at all.

Message bubbles jump on rotating

The message bubbles jump a lot on rotating. Maybe they should be locked while rotating and scrolled to the right position after the rotation?

The built-in SMS app is lazy and just fades between the states.

Save/load message color

The .sendColor property is useful for distinguishing different types of messages.
Currently I'm changing the .sendColor before sending a message depending on what kind of message it is.

The problem is that I want the conversation to be persistent, so i save and load the conversation, but the .sendColor is not persisted.

What I would like is the that the .getAllMessages() method returned and array like this:

[
    {
        index: 0,
        send: 'dsfdsf',
        sendColor: 'Purple',
        selectedColor: 'Blue'
    },
    {
        index: 1,
        recieve: 'dsfdsf',
        recieveColor: 'Gray',
        selectedColor: 'Blue'
    }
]

And the .loadMessages() would accept an array like this, and apply the colors.

autocorrect default false

In the comments in the example app, it says that autocorrect defaults to false. This is not correct. It actually defaults to true.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.