Questions tagged [addattribute]

38 questions
22
votes
1 answer

Change color and font of a string using NSAttributed String

I have a string in which last word would always be of a different color compared to the other words in entire string eg: if the string color is black then last word in the statement would be of red color. I am using NSAttributed string for it as…
tech_human
  • 6,592
  • 16
  • 65
  • 107
7
votes
1 answer

How do I uses addAttribute and NSRANGE in swift 3

Hi I'm trying to use addAttribute in Swift3. I want set bold only IDNAME. Here is what I am trying to this. let boldUsername = NSMutableAttributedString(string: "IDNAME hi nice 2 meet you :D #HELLOW") // …
Shawn Baek
  • 1,928
  • 3
  • 20
  • 34
5
votes
1 answer

How to add node in existing xml using php simpleXML?

I have a xml file like the bellow, and I need to add a new node with some child node and attribute. Custom Scale Lin custLin
Sonnet
  • 79
  • 1
  • 2
  • 7
5
votes
2 answers

How do I filter a magento collection by a select drop-down attribute?

In magento, I have an attribute called cl_designer, which is a select drop-down option. I want to filter the products collection on it, like this: $collection =…
Benubird
  • 18,551
  • 27
  • 90
  • 141
4
votes
1 answer

addAttribute to nsstring which represent "to the power of.."

The following code takes the string @"ten to the power of two = 10[2]" and set red colour to the number 2 Q: I would like to have this (fancy) effect : (mind that I am looking for a generic effect which represent a small, slight above line number -…
chewy
  • 8,207
  • 6
  • 42
  • 70
4
votes
2 answers

Magento addAttributeToFilter with Multiple Select

I'm having troubles using addAttributeToFilter on Magento Multiple select attributes. I have a multiple select attribute for car makes, so the content is 'Audi', 'BMW' and so on. In my example I have a tyre product which I have selected 5 makes for…
Adam Moss
  • 5,582
  • 13
  • 46
  • 64
3
votes
2 answers

HtmlTextWriter - Adding multiple classes to a tag

What is the best way to add multiple classes to a tag using HtmlTextWriter? What I would like to do is something like... writer.AddAttribute(HtmlTextWriterAttribute.Class, "Class1"); writer.AddAttribute(HtmlTextWriterAttribute.Class, "Class2"); …
Brett Postin
  • 11,215
  • 10
  • 60
  • 95
2
votes
3 answers

How to add admin user attributes in Magento

I'd like to add some new attributes to the admin users in Magento. These users are different than customers (just to make it clear) and it's only possible to set their user/name/lastname/mail/pass, but I'd like to add a few new attributes. To do so,…
PauGNU
  • 783
  • 3
  • 12
  • 32
2
votes
2 answers

NullPointerException in javax.swing.text.SimpleAttributeSet.addAttribute

Has anyone ever seen an exception like this (with version 1.6.0_11 of the JVM)?: ERROR: java.lang.NullPointerException: null at java.util.Hashtable.put(null:-1) at javax.swing.text.SimpleAttributeSet.addAttribute(null:-1) at…
Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
2
votes
3 answers

Magento - Adding Attributes programatically with default and searchable

I've searched everywhere for the answer, muddled through Magento and I can't find a working solution. I'm creating magento attributes dynamically and that's fine, but when it comes to setting the values setting the default value adding more…
TheBritishAreComing
  • 1,667
  • 2
  • 19
  • 38
2
votes
1 answer

POST Method multiple calls | First regular "Submi" | Second ajax{ type: 'POST',

Hi folks I need some help I have created a web page having a div#formsContent – This has the form and the action is controlled via RequestWorkListController.java div#newReqDiv – These are results of submit from above, has a table of 5 rows static…
connectoram
  • 81
  • 1
  • 4
1
vote
1 answer

Adding EditorAttribute at Run-time (Dynamically) to an Object's special Property

If I have a class like the following whose code I cannot change, how can I add an EditorAttribute to s1 at run-time? class TestClass { public String s1 {get;set;} public String s2 {get;set;} } I tried this method, but it adds an…
1
vote
1 answer

How to add an attribute to repeater item at runtime?

I have a repeater and i want to add a mouse over attribute to its items. Is it possible to add attributes at run-time, if yes then how?
Ram Singh
  • 6,664
  • 35
  • 100
  • 166
1
vote
1 answer

Cannot determine the field name in a magento filter query

I'm having trouble with using an OR filter in a Magento query. This is what i used: $collection = Mage::getModel('sales/order')->getCollection() ->addAttributeToSelect('*') ->addAttributeToFilter( …
rosh3000
  • 309
  • 2
  • 16
1
vote
0 answers

OpenLDAP PHP Add birthdate attribute

I'm trying to add Date of birth attribute from naturalPerson schema in PHP, but i get the error: 21, invalid syntax. What am i doing wrong? $addToGroup['objectclass'][2] = "inetOrgPerson"; $addToGroup['objectclass'][3] =…
1
2 3