view

set/add view from controller action

Hi all, I'm trying to set a view script to be executed in addition to the currently requested action view script. I want to do this from the controller action itself in a way that this new view script output will be available from the layout $this->layout()->content helper. I found the setView() method but don't know how to use it from...

Android : Stop image scaling down

Hi, I'm trying to draw an image in a view but having problems trying to maintain the scale of the original image. Basically, I have a small view and I would like to show part of the image in the view. The intention then is to perform a translation on the image so that a different part appears in the view. No matter what I try, either th...

Android drawing cache

Please explain how does the drawing cache work in Android. I'm implementing a custom View subclass. I want my drawing to be cached by the system. In the View constructor, I call setDrawingCacheEnabled(true); Then in the draw(Canvas c), I do: Bitmap cac = getDrawingCache(); if(cac != null) { c.drawBitmap(cac, 0, 0,...

how to dismiss my current view

hi i am having text view and on it one button to move to main view ,but i am using this is not working for me.. BackButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; BackButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter; [BackButton addTarget:self action:@selector(Back) forCon...

how can i switch to my text view and again switch to main view when button pressed

1) i have one text view which is subview of my main view and i am having one button on each view to switch between them .. what should i write in my ib action of two buttons... and i appreciate the answers .... 2)i have implemented text view with use of view controller and without view controller any one can suggest which one is better ...

Cocoa: how to connect a button to a view?

Hello, The title question might be a little vague. I will try to explain as good as i can (also note im new to cocoa programming so excuse any mistakes :) ). I have a VIEW that extends NSView where i would like to draw some images. I want the images to be loaded from some files on the disk, when i click a button. I managed to do all t...

Grails views for subclasses

I have a domain object called page that only has a title, I then have subclasses what are StaticPage that also has a textblock and PicturePage that contains a url. I have a site object that has many pages, I am looking for a way in the view for the site to call the a different template for each subclass. I can easily iterate through the ...

Is it possible to make a non-nullable column nullable when used in a view? (sql server)

Hi, To start off I have two tables, PersonNames and PersonNameVariations. When a name is searched, it finds the closest name to one of the ones available in PersonNames and records it in the PersonNameVariations table if it's not already in there. I am using a stored proc to search the PersonNames for a passed in PersonNameVariationand...

How to set unit for Paint.setTextSize()

Is it possible to change the unit for Paint.setTextSize()? As far as I know, it's pixel but I like to set the text size in DIP for multiple screen support. Thanks ...

Client Id for Property (ASP.Net MVC)

Hi guys... I'm begginer in asp.net mvc, and i have a doubs: I'm trying to do a label for a TextBox in my View and I'd like to know, how can I take a Id that will be render in client to generete scripts... for example: <label for="<%=x.Name.?ClientId?%>"> Name: </label> <%=Html.TextBoxFor(x=>x.Name) %> What need I put in "?ClientId?"...

Cocoa - calling a VIEW method from the CONTROLLER

Hello everyone, Got a little problem i asked about it before but maybe i didnt ask properly. I have a cocoa application, which amongst other things, must do the following task: - load some images from the disk, store them in an array and display them in a custom view. In the Interface Builder i have a CustomView and an OBJECT that poin...

How do I reference a pointer from a different class?

First off, I despise singletons with a passion. Though I should probably be trying to use one, I just don't want to. I want to create a data class (that is instantiated only once by a view controller on loading), and then using a different class, message the crap out of that data instance until it is brimming with so much data, it smiles...

Creating a [materialised]view from generic data in Oracle/Mysql

I have a generic datamodel with 3 tables CREATE TABLE Properties ( propertyId int(11) NOT NULL AUTO_INCREMENT, name varchar(80) NOT NULL ) CREATE TABLE Customers ( customerId int(11) NOT NULL AUTO_INCREMENT, customerName varchar(80) NOT NULL ) CREATE TABLE PropertyValues ( propertyId int(11) NOT NULL, customerId int(11) NOT...

Is there a way to present a modal view that extends outside of the bounds of the view that is presenting it?

I have a subview of a split view that is presenting a modal view but I need the modal view to take up the entire screen, not just the bounds of the presenting view, is there any way to do this? ...

Conditional tags with HAML

I have this haml: .kudobox %div.kudos= number_to_human_size_not_bytes kudos %div= (kudos == 1 || kudos == -1) ? "kudo" : "kudos" Now I want the .kudobox have a positive, negative or zero class, depending on the number of kudos: -# < 0 kudos <div class="kudobox negative"> -# == 0 kudos <div class="kudobox zero"> -# > 0 kudos <di...

Android: Detect if a View's parent Activity is paused

In one of my Activities I have a ListView that displays a list of locations. For each list item I want a little arrow icon that points in the direction of the corresponding location. I implemented this icon by extending ImageView. This custom View has a listener that reacts to changes of the device's orientation by rotating the icon imag...

Android: Detect softkeyboard open

When the soft keyboard opens I want a scroll view to scroll down to the bottom. For this I can use: fullScroll(View.FOCUS_DOWN); But how do I fire that command after the soft keyboard opening event triggers? ...

iPhone SDK Zoom/Resize Image with 2 fingers!! HELP

Help, i need to make an app that has got some images and you need to resize them on the screen!! But how can i resize them with 2 finger dragging? Help me please! Thanks ...

view with parameters?

Hello, Do I suppose correctly that it is not possible to create view with parameters? I've got a query with sub-query and in its where clause I need to specify parameter. Specifying where clause of view would not help. I would like to call simple view with parameters instead of the sending to the database complicated sql query. How wo...

Django "The view didn't return an HttpResponse object."

Hi there, i have a simple view in wich i'm saving a form. the code seems 'clean',but i can't get rid of the error : "The view didn't return an HttpResponse object." Though i've searched on the web, i did not find a relevant indication. def classroom_privacy(request,classname): theclass = Classroom.objects.get(classname=class...